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 > Linking Problem - Undefined Reference

#54927 - byg - Fri Sep 23, 2005 6:02 pm

Hi,

I'm hoping someone can help me out here. I've set up the DS toolchain using the devkitPro Windows Installer (v1.0.9). Everything installed ok. Next, I was looking at doublec's great tutorials at http://www.double.co.nz/nintendo_ds/, but when trying to compile the demo1 sample I get the following errors:

Code:

arm-elf-g++ -g -mthumb-interwork -mno-fpu -specs=ds_arm9.specs arm9_main.o -L/C/dev/tools/devkitPro/libnds/lib -lnds9 -o arm9.elf
c:/dev/tools/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/lib/interwork/
ds_arm9_crt0.o: In function `CIDLoop':
ds_arm9_crt0.s:(.init+0x1f4): undefined reference to `fake_heap_end'
arm9_main.o: In function `main':
C:\dev\consoles\nds\src\demos\demo1/arm9_main.cpp:24: undefined reference to `puts'
C:\dev\consoles\nds\src\demos\demo1/arm9_main.cpp:28: undefined reference to `printf'
C:\dev\consoles\nds\src\demos\demo1/arm9_main.cpp:29: undefined reference to `printf'
C:\dev\consoles\nds\src\demos\demo1/arm9_main.cpp:30: undefined reference to `printf'
c:/dev/tools/devkitPro/libnds/lib\libnds9.a(console.o): In function `consoleInit':
c:/projects/devkitPro/libnds/source/arm9/console.c:292: undefined reference to `setvbuf'
c:/projects/devkitPro/libnds/source/arm9/console.c:293: undefined reference to `setvbuf'
c:/projects/devkitPro/libnds/source/arm9/console.c:256: undefined reference to `devoptab_list'
c:/projects/devkitPro/libnds/source/arm9/console.c:256: undefined reference to `_impure_ptr'
c:/dev/tools/devkitPro/libnds/lib\libnds9.a(console.o): In function `con_write':
c:/projects/devkitPro/libnds/source/arm9/console.c:160: undefined reference to `sscanf'
c:/projects/devkitPro/libnds/source/arm9/console.c:165: undefined reference to `sscanf'
c:/projects/devkitPro/libnds/source/arm9/console.c:170: undefined reference to `sscanf'
c:/projects/devkitPro/libnds/source/arm9/console.c:156: undefined reference to `sscanf'
c:/projects/devkitPro/libnds/source/arm9/console.c:175: undefined reference to `sscanf'
c:/dev/tools/devkitPro/libnds/lib\libnds9.a(console.o):c:/projects/devkitPro/libnds/source/arm9/
console.c:152: more undefined references to `sscanf' follow
make: *** [arm9.elf] Error 1


I get very similar errors when trying to compile other sample code too. I've tried everything I can think of to fix this (reinstalling the toolchain, installing previous versions of libnds etc), but can't work my way around it. I've also searched these forums but couldn't find a solution. If anyone has any suggestions or a fix please let me know. I cannot wait to start dev'ing on the DS and so am willing to try almost anything!

Thanks in advance.

Byg
_________________
Modasi Games
www.modasi.com

#54931 - wintermute - Fri Sep 23, 2005 6:22 pm

looks like you managed to get the early broken r16.

If you downloaded r16, go get r16a. If you used the installer use update.

#54947 - byg - Fri Sep 23, 2005 7:35 pm

wintermute,

Thanks! I thought that was one of the things I tried, but I guess in my confusion I didn't update correctly. The updater has now downloaded and installed r16a and it all looks good.

Thanks again.
_________________
Modasi Games
www.modasi.com