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.

Beginners > problem with NMAKE & VC++ 6.0

#43352 - caesar - Sun May 22, 2005 5:44 pm

hi,

I have followed all steps for setting up devkit adv and vc++ 6.0. i have installed gba app wizard as well. but when i tried to compile simple program that is just to display an image, i got the following error:

--------------------Configuration: image - Win32 Debug--------------------
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\devkitadv\bin\gcc -I C:\devkitadv\arm-agb-elf\include -I C:\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\include -I D:\workspace\image -mthumb-interwork -c -g -O2 -Wall -fverbose-asm D:\workspace\image\interupt.cpp
D:/workspace/image/interupt.cpp:67: parse error before `[' token
NMAKE : fatal error U1077: 'C:\devkitadv\bin\gcc' : return code '0x1'
Stop.
Error executing NMAKE.

image.exe - 2 error(s), 0 warning(s)

however, when i tried to compile in command prompt or using batch file, the program compiled perfectly fine.

best regards,
Caesar

#43362 - DiscoStew - Sun May 22, 2005 7:43 pm

Do you have the exact same setting for compiling your project under the command prompt like you do with vc++? Or even, are you using ALL the files in the command prompt like in your vc++ project? It's happened to me before when I don't specify all the files for both compiling methods. Best to make sure on that.

And what do you have at line 67 in you interupt.cpp file? Sometimes it may not be that exact line either, but something before it which is affecting that line.
_________________
DS - It's all about DiscoStew

#43411 - caesar - Mon May 23, 2005 3:45 am

hi,

in vc++, i m using makefile generated by gba app wizard. that interrupt cpp is also generated by gba app wizard. i have excluded that files from the project since i m not using it and try to compile. i got the following error:
Quote:
Deleting intermediate files and output files for project 'image - Win32 Debug'.
--------------------Configuration: image - Win32 Debug--------------------
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\devkitadv\bin\gcc -I C:\devkitadv\arm-agb-elf\include -I C:\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\include -I D:\workspace\image -mthumb-interwork -c -g -O2 -Wall -fverbose-asm D:\workspace\image\image.cpp
In file included from D:/workspace/image/image.cpp:9:
D:/workspace/image/junkie.h:4:3: warning: "/*" within comment
------------------------------------------
CPP-Sources Compiled
------------------------------------------
C:\devkitadv\bin\ld -L C:\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\interwork -L C:\devkitadv\arm-agb-elf\lib\interwork -T LinkScript -o image.elf image.o -lstdc++ -lgcc -lc
/cygdrive/c/devkitadv/bin/ld: warning: cannot find entry symbol _start; defaulting to 08000000
C:\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\interwork/libgcc.a(__main.o): In function `__do_global_dtors':
__main.o(.text+0x80): undefined reference to `__EH_FRAME_BEGIN__'
C:\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\interwork/libgcc.a(__main.o): In function `__do_global_ctors':
__main.o(.text+0x114): undefined reference to `__EH_FRAME_BEGIN__'
NMAKE : fatal error U1077: 'C:\devkitadv\bin\ld' : return code '0x1'
Stop.
Error executing NMAKE.

image.exe - 1 error(s), 2 warning(s)



while the batch file i m using is just simply set path to devkitadv/bin folder and then gcc-ed it.

Quote:
path=C:\devkitadv\bin

gcc -o imagedisp.elf imagedisp.cpp -lm

objcopy -O binary imagedisp.elf imagedisp.bin


thanks for the reply