devkitpro && linux && skript


Elektranox

Well-Known Member
Joined
Dec 3, 2005
Messages
1,805
Age
34
Location
Oldenburg, Germany, Earth
Website
elektranox.dyndns.org
ich habe eben den kram mit dem Skript installiert und die SDL Sachen aus dem Ubuntu Rep.. Nun bekomme ich folgende Ausgabe bei kompilieren des Programms aus der Wiki:
Code:
<i>
</i>elektranox@erde:~/Desktop$ /usr/local/devkitPro/devkitGP2X/bin/arm-linux-gcc pixel.c -I /usr/include/SDL -lSDL -o pixel.gpe
/usr/local/devkitPro/devkitGP2X/lib/gcc/arm-linux/4.0.2/../../../../arm-linux/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status

Wo hat der jetzt das Problem?
 
Gcc probably needs some help to find the library, probably adding this
Code:
 -L /usr/local/devkitPro/devkitGP2X/lib
will work. (substitute with wherever you keep the libSDL etc).

(sdl-config --libs might help you find the correct -L line)

P.
 
Code:
<i>
</i>elektranox@erde:~/Desktop$ sdl-config --libs
-L/usr/lib -lSDL -lpthread

elektranox@erde:~/Desktop$ /usr/local/devkitPro/devkitGP2X/bin/arm-linux-gcc pixel.c  -L/usr/lib -I/usr/include/SDL -lSDL -lpthread -o pixel.gpe
/usr/local/devkitPro/devkitGP2X/lib/gcc/arm-linux/4.0.2/../../../../arm-linux/bin/ld: skipping incompatible /usr/lib/libSDL.so when searching for -lSDL
/usr/local/devkitPro/devkitGP2X/lib/gcc/arm-linux/4.0.2/../../../../arm-linux/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/usr/local/devkitPro/devkitGP2X/lib/gcc/arm-linux/4.0.2/../../../../arm-linux/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
 
you should run the proper sdl-config ;) the one you're running is returning the location of the native libraries. (Actually you're doing the same with the -I but that probably doesn't hurt as the .h files should be the same anyway) Anyway, the proper sdl-config might not be set up properly too. So, try something like this:

as root, first make sure the locate database is updated.
updatedb

then locate libSDL. <-- note the .
my system gives:
Code:
luteijn@dollar:~/devel/gp2x/file-4.16$ locate libSDL.
/home/share/luteijn/devel/gp2x/theoddbot-libs-open2x-soft-float/usr/lib/libSDL.a
/home/share/luteijn/devel/gp2x/theoddbot-libs-open2x-soft-float/usr/lib/libSDL.la
/home/share/luteijn/devel/gp2x/theoddbot-libs-open2x-soft-float/usr/lib/libSDL.so
/opt/local/gp2x/lib/libSDL.a
/opt/local/gp2x/lib/libSDL.la
/opt/local/gp2x/lib/libSDL.so
/usr/lib/libSDL.a
/usr/lib/libSDL.la
/usr/lib/libSDL.so
luteijn@dollar:~/devel/gp2x/file-4.16$

so for me the -L line would be -L/opt/local/gp2x/lib

you'll probably also want to add a -static to your gcc directive.

P.
 
Back
Top