need help for compiling 1st hello wolrd program
Posted: Sun Feb 10, 2013 7:05 pm
hello
I have problem for compiling the helloworld example that i found in the devkitpro directory
I know how to build (make in terminal or in programmer's notepad).
The makefile seems working fine, but i have compiling errors.
I think maybe i didn't really understand if i correctly installed the ndslib.
Actually, i just ran the complet installer of devkitpro. Maybe should i add somethings in the helloworld folder (but what and where) ?
Since i started today, i think i have all the lastest devkitpro, arm and ndslib.
Thanks anyone for any help.
here is the code and the errors :
I have problem for compiling the helloworld example that i found in the devkitpro directory
I know how to build (make in terminal or in programmer's notepad).
The makefile seems working fine, but i have compiling errors.
I think maybe i didn't really understand if i correctly installed the ndslib.
Actually, i just ran the complet installer of devkitpro. Maybe should i add somethings in the helloworld folder (but what and where) ?
Since i started today, i think i have all the lastest devkitpro, arm and ndslib.
Thanks anyone for any help.
here is the code and the errors :
Code: Select all
#include <nds.h>
#include <stdio.h>
volatile int frame = 0;
//---------------------------------------------------------------------------------
void Vblank() {
//---------------------------------------------------------------------------------
frame++;
}
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
touchPosition touchXY;
irqSet(IRQ_VBLANK, Vblank);
consoleDemoInit();
iprintf(" Hello DS dev'rs\n");
iprintf(" \x1b[32mwww.devkitpro.org\n");
iprintf(" \x1b[32;1mwww.drunkencoders.com\x1b[39m");
while(1) {
swiWaitForVBlank();
touchRead(&touchXY);
// print at using ansi escape sequence \x1b[line;columnH
iprintf("\x1b[10;0HFrame = %d",frame);
iprintf("\x1b[16;0HTouch x = %04X, %04X\n", touchXY.rawx, touchXY.px);
iprintf("Touch y = %04X, %04X\n", touchXY.rawy, touchXY.py);
}
return 0;
}
Code: Select all
c:/devkitPro/examples/nds/hello_world/source/main.cpp: In function 'int main()':
c:/devkitPro/examples/nds/hello_world/source/main.cpp:38:21: error: 'touchRead' was not declared in this scope
c:/devkitPro/examples/nds/hello_world/source/main.cpp:42:55: error: 'touchPosition' has no member named 'rawx'
c:/devkitPro/examples/nds/hello_world/source/main.cpp:43:45: error: 'touchPosition' has no member named 'rawy'