Hi,
I can’t seem to get the cross compiler set up properly. I can compile
the files to object files all right, but on linking I get undefined
references.
I tried using the cross compiler found here:
http://www.libsdl.org/Xmingw32/
… as well as the mingw32 Debian package. Either way, same results.
For example, if I try to compile the “checkkeys.c” test program, I get:
gcc sdl-config --cflags
-c checkkeys.c
gcc sdl-config --libs
-o checkkeys checkkeys.o
checkkeys.o(.text+0x77):checkkeys.c: undefined reference to SDL_GetModState' checkkeys.o(.text+0x24a):checkkeys.c: undefined reference to
SDL_GetKeyName’
checkkeys.o(.text+0x3cf):checkkeys.c: undefined reference to SDL_SetVideoMode' checkkeys.o(.text+0x412):checkkeys.c: undefined reference to
SDL_EnableUNICODE’
checkkeys.o(.text+0x424):checkkeys.c: undefined reference to SDL_EnableKeyRepeat' checkkeys.o(.text+0x444):checkkeys.c: undefined reference to
SDL_WaitEvent’
Naturally, the gcc and sdl-config point to the cross-tools version.
Please CC to me, I’m not subscribed.
Thanks for your help!
// joey tsai--
joey tsai | MISFORTUNE, n. The kind of fortune that never misses.
| – Ambrose Bierce, “The Devil’s Dictionary”