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.

C/C++ > Visual Studio + Devkit Advance?

#8163 - Wanderer - Thu Jul 03, 2003 2:37 pm

Hi,

I'm trying to switch over to using Visual Studio to compile and edit my GBA code using the Devkit Advance as the compiler, and I'm having a few problems. I've been following the guide at http://www.matt-tighe.co.uk/gba/tutorials/vstudio/vstudio-devkitadv.htm but my project won't build succesfully. The code is alright (it hasn't been changed since I brought it in) so it must be a configuration issue I guess.

If I try to build the project I get the error "NMAKE : fatal error U1073: don't know how to make 'Util.c'" which suggests that its reading the makefile and trying to follow the build process but seems to get confused over the first .c file it trys to compile.

I then tried compiling Util.c by itself and I get a different error "Cannot compile the file 'D:\mygbadevstuffpath\Util.c'; no compile tool is associated with the file extension." which seems rather worrying.

I'm using VisualC++ 6.0

any help would be greatly welcomed,

cheers,


Wanderer.

#8165 - Daikath - Thu Jul 03, 2003 3:02 pm

Have you tried compile or build? Using build should resolve it.
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?

#8167 - johnny_north - Thu Jul 03, 2003 3:31 pm

I was having this problem and I found that it was because I was unfamiliar with how the make file of a project should be set up. Most likely, your make file isn't telling the compiler how to build Util.c. Make sure that in your make file you tell the compiler that Util.o is one of your object files. Then also make sure that the rule to build .c files will include compilation of Util.c.

If you're not familiar with make files, check out the make file tutorial in the docs section of gbadev.

#8182 - Wanderer - Thu Jul 03, 2003 10:18 pm

I think it was my makefile that was having problems.. I've just about got it working by a process of trial and error from the dos prompt, however I get an error which I haven't had before:

Code:
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccYM2RIB.s: Assembler messages:
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccYM2RIB.s:17348: Error: Invalid swi
 expression
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccYM2RIB.s:17348: Error: Value of 32
7680 too large for field of 2 bytes at 1488
make: *** [Util.o] Error 1


this seems to be because of the line: "asm volatile("swi 0x50000");" which I'm using to call the Bios function "VBlankIntrWait".. all this worked fine when I was using a batchfile to compile my code (no interim .o stage) but now seems to be causing this error, any ideas folks?????

cheers,


Wanderer.

#8185 - Wanderer - Fri Jul 04, 2003 12:37 am

Me again..

my bad, I'd nicked a command line option from the make file I was using for inspiration.. which decided to bite me in the posterior.

for reference including '-mthumb -mthumb-interwork' in the parameters to gcc was a bad idea.


Wanderer.

#8215 - tepples - Fri Jul 04, 2003 4:31 pm

Wanderer wrote:
for reference including '-mthumb -mthumb-interwork' in the parameters to gcc was a bad idea.

The difference is that Thumb code expresses swi's as swi 0x05, while ARM takes swi 0x050000.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.