Hello world: linking problem

support for the ARM toolchain
Post Reply
toberal
Posts: 2
Joined: Thu Apr 15, 2010 10:53 am

Hello world: linking problem

Post by toberal » Thu Apr 15, 2010 11:09 am

Hi, i'm newbie.
i've downloaded devkitPro. I can't make "hello world" example.
i try C:\devkitPro\examples\nds\hello_world\hello_world.pnproj
result:
----
> "make"
main.cpp
arm-eabi-g++ -MMD -MP -MF /c/devkitpro/examples/nds/hello_world/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/c/devkitpro/examples/nds/hello_world/include -I/c/devkitpro/examples/nds/hello_world/build -I/c/devkitPro/libnds/include -I/c/devkitPro/libnds/include -I/c/devkitpro/examples/nds/hello_world/build -DARM9 -fno-rtti -fno-exceptions -c /c/devkitpro/examples/nds/hello_world/source/main.cpp -o main.o
c:/devkitpro/examples/nds/hello_world/source/main.cpp: In function 'int main()':
c:/devkitpro/examples/nds/hello_world/source/main.cpp:38: error: 'touchRead' was not declared in this scope
c:/devkitpro/examples/nds/hello_world/source/main.cpp:42: error: 'struct touchPosition' has no member named 'rawx'
c:/devkitpro/examples/nds/hello_world/source/main.cpp:43: error: 'struct touchPosition' has no member named 'rawy'
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:04
-----------

and i tried
C:\devkitPro\PAlibExamples\Text\Normal\HelloWorld\Template.pnproj

result:
-----
> "make"
main.c
In file included from c:/devkitPro/PAlib//include/nds/PA9.h:24,
from c:/devkitpro/palibexamples/text/normal/helloworld/source/main.c:3:
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h: In function 'PA_CheckLid':
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:302: warning: 'getIPC' is static but used in inline function 'PA_CheckLid' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:308: warning: 'getIPC' is static but used in inline function 'PA_CheckLid' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h: In function 'PA_SetScreenLight':
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:388: warning: 'getIPC' is static but used in inline function 'PA_SetScreenLight' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:389: warning: 'getIPC' is static but used in inline function 'PA_SetScreenLight' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h: In function 'PA_SetLedBlink':
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:405: warning: 'getIPC' is static but used in inline function 'PA_SetLedBlink' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_General.h:406: warning: 'getIPC' is static but used in inline function 'PA_SetLedBlink' which is not static
In file included from c:/devkitPro/PAlib//include/nds/PA9.h:73,
from c:/devkitpro/palibexamples/text/normal/helloworld/source/main.c:3:
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h: In function 'PA_16c8pixels':
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h:91: warning: 'PA_Plot8Pixels' is static but used in inline function 'PA_16c8pixels' which is not static
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h: In function 'PA_16c8X8Letter':
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h:105: warning: 'PA_16c8X8Color' is static but used in inline function 'PA_16c8X8Letter' which is not static
In file included from c:/devkitPro/PAlib//include/nds/PA9.h:73,
from c:/devkitpro/palibexamples/text/normal/helloworld/source/main.c:3:
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h: In function 'PA_16cLetter':
c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h:507: warning: 'PA_16c16X16Letter' is static but used in inline function 'PA_16cLetter' which is not static
arm-eabi-g++ -g -mthumb-interwork -mno-fpu -L/c/devkitPro/PAlib/lib -specs=ds_arm9.specs main.o -Lc:/devkitPro/PAlib//lib -lpa9 -L/c/devkitPro/libnds/lib -lfat -lnds9 -ldswifi9 -o build.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/lib/ds_arm9_crt0.o: In function `CIDLoop':
(.init+0x1c0): undefined reference to `__libnds_mpu_setup'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/lib/ds_arm9_crt0.o: In function `CIDLoop':
(.init+0x210): undefined reference to `initSystem'
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/lib/ds_arm9_crt0.o: In function `CIDLoop':
(.init+0x21c): undefined reference to `__libnds_exit'
collect2: ld returned 1 exit status
make[1]: *** [/c/devkitpro/palibexamples/text/normal/helloworld/helloworld.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:03
-----

I tried with another nds project, but i've always build errors. :-(

i also tried wii example and i haven't any problem. compiling successful


Help me please.

StevenH
Posts: 133
Joined: Sun Feb 22, 2009 7:59 pm

Re: Hello world: linking problem

Post by StevenH » Thu Apr 15, 2010 12:03 pm

OK, I see the issue with your second make results:

http://wiki.devkitpro.org/index.php/PAlib

In simple terms - Uninstall devkitPro and PALib, then re-install devkitPro only and try the hello_world example only.

PALib does some weird things to the toolchain to get it to work and even the current maintainer wants the lib to die as libnds is getting better all the day....

toberal
Posts: 2
Joined: Thu Apr 15, 2010 10:53 am

Re: Hello world: linking problem

Post by toberal » Thu Apr 15, 2010 1:19 pm

Thank you, :-D

now, it's work.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests