gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Strange problem with toolchain

#47331 - Sausage Boy - Thu Jul 07, 2005 6:01 pm

I have a tricky problem with my toolchain. It compiles fine as long as it doesn't have to use anything from external .o's. The linker will fail with error messages like this:

Code:


D:\ndsdev\projects\template>make
linking binary
arm-elf-g++ -specs=ds_arm9.specs -g -mthumb -mthumb-interwork -mno-fpu -Wl,-Map, template.map bg.pal.o bg.raw.o bg.map.o main.o -L/d/ndsdev/Toolchain/libnds/lib -lnds9 -o /d/ndsdev/projects/template/template.elf
d:/ndsdev/Toolchain/libnds/lib\libnds9.a(console.o): In function `consoleInitDefault':
d:/ndsdev/Toolchain/libnds/source/arm9/console.c:143: undefined reference to `default_font_bin'
collect2: ld returned 1 exit status
make[1]: *** [/d/ndsdev/projects/template/template.elf] Error 1
make: *** [build] Error 2





If I have resources like bg.raw, and try to access bg_raw, it gives me "undefnied reference to bg_raw", even though the .o sits properly in build.

It does this to everything I try to compile.
Please, help me!
_________________
"no offense, but this is the gayest game ever"

#47446 - smcclain - Fri Jul 08, 2005 11:31 pm

I had the same problem this weekend... there was a bug in the base_rules bin2o macro... there is a fixed version released on the DevkitPro website - http://devkitpro.sourceforge.net/ just scroll down to the july 3rd news item

#47448 - smcclain - Fri Jul 08, 2005 11:37 pm

another thing... you might have to rebuild libnds once you get the base_rules updated... thats where the error is occurring

#50030 - TheMikaus - Thu Aug 04, 2005 6:29 pm

I'm having the same problem with the 23rd July 2005 devkitARM release, I copied the base_rules and that didn't fix it. If I do a clean/make/install on libnds it works fine, but when I go to use it with the examples. I get this...

Code:

c:/devkitPro/examples/nds/Graphics/2D/16bit_color_bmp/source/main.cpp:73: undefined reference to `drunkenlogo_bin'
c:/devkitPro/libnds/lib\libnds9.a(console.o): In function `consoleInitDefault':
c:/devkitPro/libnds/source/arm9/console.c:147: undefined reference to `default_font_bin'



Is there an update or something that I'm missing?

--EDIT--
I think it's the same problem with the bin2o thing because the bin files contain the directory as part of the file. but when I update the base rules from the devkitpro site it didn't fix the problem :(

--Edit--
new release made it all better