Make win32 fails!

Ok, I use the mingw32 compiler which you can
download from Sam’s SDL-page…

the following error appears:

gcc -DCLIENT_DIRECTORY=’"/home/globbi/stuff/work/bardaran/share/bclient"’ -o client -L/opt/SDL_WIN32/SDL-0.9.9//lib -L/home/globbi/stuff/work/bardaran/lib -mwindows main.o clientnio.o client_path.o winclient.o text.o environment.o -lgcc -lcomdlg32 -lcrtdll -lgdi32 -liberty -lmoldname -lshell32 -luser32 -lkernel32 -ladvapi32 -lwinmm -lwsock32 -lstdc++ -lmingw32 -lSDL -lwinlibs -lshared
/opt/SDL_WIN32/SDL-0.9.9//lib/libSDL.a(winmain.o)(.text+0x43b):winmain.c: undefined reference to RunMain(int, char **)' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x13a):network.cc: undefined reference toselect at 20’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x1fd):network.cc: undefined reference to socket at 12' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x21e):network.cc: undefined reference tosetsockopt at 20’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x24b):network.cc: undefined reference to htons at 4' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x270):network.cc: undefined reference tobind at 12’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x291):network.cc: undefined reference to htons at 4' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x2b4):network.cc: undefined reference tobind at 12’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x9f2):network.cc: undefined reference to `__WSAFDIsSet at 8’

I have -mwindows, my source tree is totaly fresh (I did a make distclean)
and I did every -l switch I found in the mingw32 - lib - directory

Can anybody help? …

thanx, Manuel

Manuel Klimek wrote:

Ok, I use the mingw32 compiler which you can
download from Sam’s SDL-page…

the following error appears:

gcc -DCLIENT_DIRECTORY=’"/home/globbi/stuff/work/bardaran/share/bclient"’ -o client -L/opt/SDL_WIN32/SDL-0.9.9//lib -L/home/globbi/stuff/work/bardaran/lib -mwindows main.o clientnio.o client_path.o winclient.o text.o environment.o -lgcc -lcomdlg32 -lcrtdll -lgdi32 -liberty -lmoldname -lshell32 -luser32 -lkernel32 -ladvapi32 -lwinmm -lwsock32 -lstdc++ -lmingw32 -lSDL -lwinlibs -lshared
/opt/SDL_WIN32/SDL-0.9.9//lib/libSDL.a(winmain.o)(.text+0x43b):winmain.c: undefined reference to RunMain(int, char **)' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x13a):network.cc: undefined reference toselect at 20’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x1fd):network.cc: undefined reference to socket at 12' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x21e):network.cc: undefined reference tosetsockopt at 20’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x24b):network.cc: undefined reference to htons at 4' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x270):network.cc: undefined reference tobind at 12’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x291):network.cc: undefined reference to htons at 4' /home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x2b4):network.cc: undefined reference tobind at 12’
/home/globbi/stuff/work/bardaran/lib/libshared.a(network.o)(.text+0x9f2):network.cc: undefined reference to `__WSAFDIsSet at 8’

I have -mwindows, my source tree is totaly fresh (I did a make distclean)
and I did every -l switch I found in the mingw32 - lib - directory

Can anybody help? …

The correct order of the “-l” statement is important ! As all you
undefined references occur in libshared and as -lshared is the last one,
you should try to move -lshared away from the end of your linker command
line. Probably in front of the system libs.

If “libhighlevel” calls stuff from “liblowlevel”, you must say:

“gcc … -lhighlevel -llowlevel …”

Good luck !–
Karsten-O. Laux
klaux at student.uni-kl.de
http://www.rhrk.uni-kl.de/~klaux
UIN 21614933 (Bert)

gcc -DCLIENT_DIRECTORY=’"/home/globbi/stuff/work/bardaran/share/bclient"’ -o client -L/opt/SDL_WIN32/SDL-0.9.9//lib -L/home/globbi/stuff/work/bardaran/lib -mwindows main.o clientnio.o client_path.o winclient.o text.o environment.o -lgcc -lcomdlg32 -lcrtdll -lgdi32 -liberty -lmoldname -lshell32 -luser32 -lkernel32 -ladvapi32 -lwinmm -lwsock32 -lstdc++ -lmingw32 -lSDL -lwinlibs -lshared

If you can, use the Makefile format used in the examples archive.
There are some subtle things about compiling (like library order) that
it takes care of automatically.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

HI
I just want to ask that would it be suitable to post questions about
smpeg (compilation problems) here in this list. I am runnig into a lot of
problems.

Thank

FT

HI
I just want to ask that would it be suitable to post questions about
smpeg (compilation problems) here in this list. I am runnig into a lot of
problems.

You should in general send them to smpeg-bugs at lokigames.com

A FAQ though:
SMPEG requires SDL 0.9.13, the CVS snapshot, not SDL 0.9.9 as is stated in
the README.

SDL 0.9.13 is pretty close to release. The only major thing missing is
some VC++ project file updates and UNICODE support under Win32.

-Sam Lantinga				(slouken at devolution.com)

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

Oki, it was just the -l order
I always thought it had to be -llowlevel -lhighlevel, wich made me sit for
hours in front of my computer and just wandering what was wrong :wink:
thanks a lot, but now it works even with my automake-Makefiles

Manuel