implicit declaration of function 'SDL_GetKeyState' is invalid in C99

244 views
Skip to first unread message

colombian developers

unread,
Apr 21, 2014, 7:09:33 PM4/21/14
to emscripte...@googlegroups.com
modules/libkey/libkey.c:430:5: note: please include the header <string.h>
      explicitly provide a declaration for 'memset'
modules/libkey/libkey.c:440:33: error: implicit declaration of function
      'SDL_GetKeyState' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    if ( !keystate ) keystate = SDL_GetKeyState( NULL );
                                ^
modules/libkey/libkey.c:440:31: warning: incompatible integer to pointer
      conversion assigning to 'unsigned char *' from 'int' [-Wint-conversi
    if ( !keystate ) keystate = SDL_GetKeyState( NULL );
                              ^ ~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting


---------------------------------------------------------------------------------------------------------------------



my sdk is master ... and windows 7 ultimate x64


please heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp meeeeeeeeeeeeeeeee.....!!!!!

Alon Zakai

unread,
Apr 22, 2014, 1:07:41 PM4/22/14
to emscripte...@googlegroups.com
There is no such function in emscripten's SDL. You can use SDL_GetKeyboardState which is similar.

- ALon



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages