Linker Problem For Hello World (linux-based Open2x App Toolchain)


timothee

Member
Joined
Dec 6, 2007
Messages
171
Age
46
Location
Singapore
Website
Visit site
Hi,

I'm finally trying to develop something for the gp2x. I followed the wiki's instructions to install the app toolchain of open2x, which is now installed at /opt/open2x/gcc-4.1.1-glibc-2.3.6/. I've also added the libpack too.

For a first attempt, I'm trying to compile the hello word sdl example from here.

When attempting to compile, I get a linker error:
CODE
$ /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-g++ sdltest.c -static -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL -o sdltestgp2x.gpe
/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/../lib/gcc/arm-open2x-linux/4.1.1/../../../../arm-open2x-linux/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status


The SDL header files are under /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL and the .so/.a/.la files are under /opt/open2x/gcc-4.1.1-glibc-2.3.6/lib .

I'm a total noob when it comes to building anything, what did I do wrong?

Thanks in advance!
Tim.
 
Back
Top