OESF Portables Forum
Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Linux Applications => Topic started by: cmisip on May 30, 2004, 04:33:49 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.
-
Seems to be a SDL application. I recommend -lSDLmain
-
/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.
-
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
-
You did -ISDLmain while I recommended -lSDLmain
-
Oh please elaborate. They look the same to me? And where do I put it?
Thanks.
-
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)
-
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
-
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 (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.