Problem about cross-compiling

Hi all,
I’ve problems cross-compiling SDL-1.0.0 applications to Win32. I know that
some of you have already discussed about it, but I wasn’t able to solve my
problem reading the newsgroup.
My system is glibc-2.1 based, and I use cross32-linux-x86-glibc-2.1
cross-compiler and libraries from SDL-1.0.0-mingw32.tar.gz; I linked libSDL
and libSDLmain, but I got “undefined reference to WinMain at 16” error. I’ve
always compiled SDL_0.10.0 win32 applications in this way. So, what’s wrong
?

Tanks for your help.
Andrea.

Hi all,
I’ve problems cross-compiling SDL-1.0.0 applications to Win32. I know that
some of you have already discussed about it, but I wasn’t able to solve my
problem reading the newsgroup.
My system is glibc-2.1 based, and I use cross32-linux-x86-glibc-2.1
cross-compiler and libraries from SDL-1.0.0-mingw32.tar.gz; I linked libSDL
and libSDLmain, but I got “undefined reference to WinMain at 16” error. I’ve
always compiled SDL_0.10.0 win32 applications in this way. So, what’s wrong
?

You should link with the output of sdl-config --libs:

-L/usr/local/cross-tools/i386-mingw32/lib -lmingw32 -lSDLmain -lSDL -luser32 -lgdi32 -lwinmm -ldxguid -mwindows

The dxguid library is only necessary if you’ve compiled with DirectX support.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec