CCmachined
Member
- Joined
- Nov 3, 2007
- Messages
- 347
hi, i just installed the open2x toolchain for Linux (open2x-libpack-20071903-gcc-4.1.1-glibc-2.3.6.tar.bz2 and arm-open2x-linux-apps-gcc-4.1.1-glibc-2.3.6_i686_linux.tar.bz2) by extracting them into /opt. i'm not doing this as root; i gave myelf permissions to /opt/.
i'm compiling the SDL Hello World in the gp2x wiki, but with the header changed from "SDL.h" to "SDL/SDL.h" as it is inside the libs pack.
here's the output:
QUOTE
ccmachine@andrewiv-portable:/opt/open2x/gcc-4.1.1-glibc-2.3.6$ ./bin/arm-open2x-linux-g++ ~/gp2x/sdl_hello_world.cpp -lSDL -o ~/gp2x/sdl_hello_world2x.out
/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
ccmachine@andrewiv-portable:/opt/open2x/gcc-4.1.1-glibc-2.3.6$
i've tried "-lSDL/SDL" and "-lSDLmain" as used by mingw32, but they all cannot be found. i tried adding "/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin" to my path by running "PATH=$PATH:/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin" but then, it fails to find the header file "SDL/SDL.h". Help!
i'm compiling the SDL Hello World in the gp2x wiki, but with the header changed from "SDL.h" to "SDL/SDL.h" as it is inside the libs pack.
here's the output:
QUOTE
ccmachine@andrewiv-portable:/opt/open2x/gcc-4.1.1-glibc-2.3.6$ ./bin/arm-open2x-linux-g++ ~/gp2x/sdl_hello_world.cpp -lSDL -o ~/gp2x/sdl_hello_world2x.out
/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
ccmachine@andrewiv-portable:/opt/open2x/gcc-4.1.1-glibc-2.3.6$
i've tried "-lSDL/SDL" and "-lSDLmain" as used by mingw32, but they all cannot be found. i tried adding "/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin" to my path by running "PATH=$PATH:/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin" but then, it fails to find the header file "SDL/SDL.h". Help!