September 11, 2001 mouse | ||||
---|---|---|---|---|
| ||||
I tried to compile this program that is on the user guide and got this error: C:\bin>sc msmouse.c mouse system\n"); ^ msmouse.c(15) : Lexical error: unterminated string if ((status & LEFT_BUTTON) && (status != ^ msmouse.c(27) : Error: undefined identifier 'LEFT_BUTTON' if (status & RIGHT_BUTTON) ^ msmouse.c(35) : Error: undefined identifier 'RIGHT_BUTTON' --- errorlevel 1 C:\bin> #include <stdio.h> #include <msmouse.h> #include <stdlib.h> int main() { if (msm_init() == -1) { printf("Mouse initialization succeeded\n"); msm_showcursor(); while (1) { int status; unsigned x, y; status = msm_getstatus(& x, &y); if (status & LEFT_BUTTON) { msm_hidecursor(); printf("x = %u, y = %u\n", x, y); msm_showcursor(); } if (status & RIGHT_BUTTON) break; } msm_term(); } else { printf("Mouse initialization failed\n"); return EXIT_FAILURE; } return EXIT_SUCCESS; } |
September 12, 2001 Re: mouse | ||||
---|---|---|---|---|
| ||||
Posted in reply to qwertier9023 | I cut the program from the text below and could compile and run it right away. See if your msmouse.h is corrupted. -- Rajiv qwertier9023 <psonetwol@hotmail.com> wrote in message news:9nlma6$1jcb$1@digitaldaemon.com... > I tried to compile this program that is on the user guide and got this > error: > C:\bin>sc msmouse.c > mouse system\n"); > ^ > msmouse.c(15) : Lexical error: unterminated string > if ((status & LEFT_BUTTON) && (status != > ^ > msmouse.c(27) : Error: undefined identifier 'LEFT_BUTTON' > if (status & RIGHT_BUTTON) > ^ > msmouse.c(35) : Error: undefined identifier 'RIGHT_BUTTON' > --- errorlevel 1 > > C:\bin> > > > #include <stdio.h> > #include <msmouse.h> > #include <stdlib.h> > > int main() > > if (msm_init() == -1) > printf("Mouse initialization succeeded\n"); > > msm_showcursor(); > > while (1) > int status; > unsigned x, y; > status = msm_getstatus(& x, &y); > > if (status & LEFT_BUTTON) > msm_hidecursor(); > printf("x = %u, y = %u\n", x, y); > msm_showcursor(); > } > > if (status & RIGHT_BUTTON) > break; > } > > msm_term(); > } > else > printf("Mouse initialization failed\n"); > return EXIT_FAILURE; > } > > return EXIT_SUCCESS; > } > > > |
Copyright © 1999-2021 by the D Language Foundation