cmisip
May 30 2004, 12:33 PM
I am trying to compile xu4. I get this error using gcc 2.95.3
/usr/local/bin/arm-linux-gcc -DHAVE_BACKTRACE=1 -DHAVE_VARIADIC_MACROS=1 -Wall -I. -I/home/cmisip/develop/usr/local/include -I/home/cmisip/develop/usr/local/include/SDL -DQWS -D_REENTRANT -Dmain=SDL_main -I/home/cmisip/develop/usr/local/include/libxml2 -DICON_FILE="/usr/local/share/pixmaps/u4.bmp" -DVERSION="0.9" -ggdb -rdynamic -o dumpsavegame util/dumpsavegame.o savegame.o io.o names.o
/usr/local/arm-linux/lib/crt1.o: In function `_start':
/usr/local/arm-linux/lib/crt1.o(.text+0x2c): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [dumpsavegame] Error 1
Anybody care to comment what is going on?
Thanks.
Mickeyl
May 31 2004, 09:57 AM
Seems to be a SDL application. I recommend -lSDLmain
cmisip
May 31 2004, 11:41 AM
/usr/local/bin/arm-linux-gcc -DHAVE_BACKTRACE=1 -DHAVE_VARIADIC_MACROS=1 -Wall -I. -I/home/cmisip/develop/usr/local/include -I/home/cmisip/develop/usr/local/include/SDL -DQWS -D_REENTRANT -Dmain=SDL_main -I/home/cmisip/develop/usr/local/include/libxml2 -DICON_FILE="/usr/local/share/pixmaps/u4.bmp" -DVERSION="0.9" -ggdb -rdynamic -ISDLmain -o dumpsavegame util/dumpsavegame.o savegame.o io.o names.o
/usr/local/arm-linux/lib/crt1.o: In function `_start':
/usr/local/arm-linux/lib/crt1.o(.text+0x2c): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [dumpsavegame] Error 1
I added -ISDLmain but get the same error.
cmisip
May 31 2004, 11:44 AM
Does it help to say that xu4 was not meant to be compiled with gcc 2.95.x because of anonymous union structs (I changed those). The source files in u4/util compile fine on gcc 3.2.2. What changes does the makefile need?
Thanks again
Mickeyl
May 31 2004, 12:13 PM
You did -ISDLmain while I recommended -lSDLmain
cmisip
May 31 2004, 12:31 PM
Oh please elaborate. They look the same to me? And where do I put it?
Thanks.
Mickeyl
May 31 2004, 12:50 PM
Uhm... it's two different letters. One is a uppercase I, as in Isadora, the other is a lowercase l as in library
(The point where you placed it was ok)
cmisip
May 31 2004, 01:05 PM
Here is what I got:
/usr/local/bin/arm-linux-gcc -DHAVE_BACKTRACE=1 -DHAVE_VARIADIC_MACROS=1 -Wall -I. -I/home/cmisip/develop/usr/local/include -I/home/cmisip/develop/usr/local/include/SDL -DQWS -D_REENTRANT -Dmain=SDL_main -I/home/cmisip/develop/usr/local/include/libxml2 -DICON_FILE="/usr/local/share/pixmaps/u4.bmp" -DVERSION="0.9" -ggdb -rdynamic -lSDLmain -o dumpsavegame util/dumpsavegame.o savegame.o io.o names.o
/usr/local/arm-linux/bin/ld: cannot find -lSDLmain
collect2: ld returned 1 exit status
make: *** [dumpsavegame] Error 1
The contents of my lib directory are:
libpng12.a libSDL.a libxml2.la
libpng12.so libSDL.la libxml2.so
libpng12.so.0 libSDLmain.a libxml2.so.2
libpng12.so.0.1.2.5 libSDL_mixer-1.2.so.0 libxml2.so.2.6.6
libpng.a libSDL_mixer-1.2.so.0.2.3 libz.so
libpng.so libSDL_mixer.a libz.so.1
libpng.so.3 libSDL_mixer.la libz.so.1.2.1
libpng.so.3.1.2.5 libSDL_mixer.so pkgconfig
libSDL-1.2.so.0 libSDL.so python2.2
libSDL-1.2.so.0.7.0 libxml2.a xml2Conf.sh
cmisip
May 31 2004, 01:11 PM
On a positive note, compilation proceeds up to this point and creates a u4 binary drop in replacement to xu4 from
http://inter.zon.free.fr/zaurus_index.htmlwhich runs on the zaurus 5600.
Dont know the long term consequences of this though. It runs and I am able to move, kill monsters and save the game.
I still would like to know where I am wrong.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.