#38484 - serf - Mon Mar 28, 2005 11:45 am
Ok, I'm trying to get started on OS X here using libgba and devkitARM. I've managed to compile and run a quick little program that writes out a bunch of pixels to the framebuffer and loops -- no problem there. But now I'm trying to call functions in libgba, and every single time I get the following linker error:
I know that the header files are found correctly: gcc complains if Div gets an incorrect number of arguments. I think ld is finding libgba.a OK: if I change -lgba to -lfake, it complains about not being able to find the library.
I'm using the precompiled version of devkitARM r11 for OS X from their Sourceforge site, and libgba 20050313 from the same source. I've tried both the version of libgba.a in the binary distribution and one that I built from source using devkitARM -- neither worked (same error as above).
Any thoughts on how I might be able to fix this?
Code: |
dynamic-oit-vapornet-c-178:~/Projects/devkitARMtest matt$ make /Users/matt/devkitARM_r11_OSX/bin/arm-elf-gcc -mthumb-interwork -c test.c /Users/matt/devkitARM_r11_OSX/bin/arm-elf-gcc -specs=gba.specs -lgba -mthumb-interwork test.o -o test.elf test.o(.text+0x104): In function `main': : undefined reference to `Div' collect2: ld returned 1 exit status make: *** [build] Error 1 |
I know that the header files are found correctly: gcc complains if Div gets an incorrect number of arguments. I think ld is finding libgba.a OK: if I change -lgba to -lfake, it complains about not being able to find the library.
I'm using the precompiled version of devkitARM r11 for OS X from their Sourceforge site, and libgba 20050313 from the same source. I've tried both the version of libgba.a in the binary distribution and one that I built from source using devkitARM -- neither worked (same error as above).
Any thoughts on how I might be able to fix this?