Page 1 of 1

can't compile example. arm-eabi-g++ "(" unexpected.

Posted: Fri Apr 16, 2010 10:53 pm
by VeloxSouth
OS: Ubuntu 9.10
devkitARMr30

I input make into the hello_world folder and it outputs the following

main.cpp
arm-eabi-g++ -MMD -MP -MF /home/steven/devkitPro/nds-examples-20100313/hello_world/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/home/steven/devkitPro/nds-examples-20100313/hello_world/include -I/home/steven/devkitPro/nds-examples-20100313/hello_world/build -I/home/steven/devkitPro/libnds/include -I/home/steven/devkitPro/libnds/include -I/home/steven/devkitPro/nds-examples-20100313/hello_world/build -DARM9 -fno-rtti -fno-exceptions -c /home/steven/devkitPro/nds-examples-20100313/hello_world/source/main.cpp -o main.o
/home/steven/devkitPro/devkitARM/bin/arm-eabi-g++: 1: Syntax error: "(" unexpected
make[1]: *** [main.o] Error 2
make: *** [build] Error 2

This problem has held me up for two days. If anyone has any ideas as to what is causing this, please help.

Other example problems that use arm-eabi-gcc give the same "(" unexpected error.

Re: can't compile example. arm-eabi-g++ "(" unexpected.

Posted: Sat Apr 17, 2010 5:23 pm
by WinterMute
This sounds similar to a problem a user had with devkitPPC which drove us utterly nuts on IRC recently. What turned out to be the problem in his case was that he was trying to run the 64bit version on a 32bit OS, hopefully yours is the same problem.

Use the i686-linux archive instead of the x86_64-linux archive.

Re: can't compile example. arm-eabi-g++ "(" unexpected.

Posted: Tue Apr 20, 2010 2:06 pm
by VeloxSouth
Thank you very much WinterMute. You were dead-on.

Unfortunately I've got another issue and tried to solve it myself again but I'm at a loss despite browsing the thread history again. I've got this output now.

steven@steven-laptop:~/devkitPro/examples/nds/hello_world$ make
Nintendo DS rom tool 1.47 - Mar 25 2010
by Rafael Vuijk, Dave Murphy, Alexei Karpenko
failed to open input file
make[1]: *** [/home/steven/devkitPro/examples/nds/hello_world/hello_world.nds] Error 1
make: *** [build] Error 2

it creates a 60KB hello_world.nds file that does not work on the DS or emulator.

Re: can't compile example. arm-eabi-g++ "(" unexpected.

Posted: Tue Apr 20, 2010 4:02 pm
by WinterMute
That's a missing default arm7 binary I think, really should update the error messages in ndstool.

See the links at http://wiki.devkitpro.org/index.php/Get ... /devkitARM

Re: can't compile example. arm-eabi-g++ "(" unexpected.

Posted: Tue Apr 20, 2010 9:14 pm
by VeloxSouth
Thanks for everything! It turns out that I had my folder structure like this

libnds
|-default_arm7-0.5.12
| |-default.arm7
| |-default.elf
|...

when it should have been without the default_arm7-0.5.12 folder.

Again, thanks for the help and the dev tools.