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 > devkitARM R16a and the new libnds

#54279 - Dannon - Sat Sep 17, 2005 5:03 pm

I've just updated to the new devkit and started by trying to compile one of the templates that comes with the new examples, but there is an error when I try to build, it says:

linking arm9.elf
main.o: In function `main':
c:/Development/NDSDev/examples/nds/templates/arm9/source/main.c:50: undefined reference to `iprintAt'
make[1]: *** [/c/Development/NDSDev/examples/nds/templates/arm9/arm9.elf] Error 1
make: *** [build] Error 2

It seems to be a problem with iprintAt, but I'm not too sure how I can fix it, suggestions?

#54307 - wintermute - Sun Sep 18, 2005 12:05 am

oops, missed one

replace the line

Code:

iprintAt(0,10,"Touch x = %04X, %04X\n", touchXY.x, touchXY.px);


with

Code:

iprintf("\x1b[10;0HTouch x = %04X, %04X\n", touchXY.x, touchXY.px);


It was decided to use ansi escape sequences in preference to *printAt( ... ) functions so we can fold this into streams later. Have a look at Graphics/2D/ansi_console for details of the ansi escapes that have been implemented.

#54309 - Dannon - Sun Sep 18, 2005 12:38 am

Thanks a lot, I should have realised as I had looked at the examples but only tried compiling the templates. What command has replaced clearConsole()?

#54347 - wintermute - Sun Sep 18, 2005 5:34 pm

Code:

iprintf("\x1b[2J");


it's all in the ansi_console example

#54348 - Dannon - Sun Sep 18, 2005 5:41 pm

Thanks, again.

I was using that but it wouldn't work then I noticed that I hadn't included stdio.h