Page 1 of 1

Setting up devkitARM with Visual C++ 2010 Express

Posted: Thu Jun 17, 2010 12:11 am
by RedChu
I've searched numerous times looking for something that would explain how to setup the devkitARM toolchain for at least Visual C++ 2008 Express, but really, nothing I've found is working out properly.

Apparently there used to be a little guide on this site that said how to do this, however it's no longer online and I had to resort to going to http://web.archive.org/web/200807130824 ... c-express/. I tried what this said and I can't fully understand it, and I don't know if the images were necessary or not since they aren't on there.

Following what I could of that and other guides, I've managed to get as far as:

Code: Select all

1>------ Build started: Project: template, Configuration: Debug Win32 ------
1>  linking multiboot
1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/lib/thumb/gba_crt0.o: In function `CIDExit':
1>  (.init+0x20c): undefined reference to `main'
1>  collect2: ld returned 1 exit status
1>  make[1]: *** [/c/Users/pc/Documents/GBAprojects/template/template/template_mb.elf] Error 1
1>  make: *** [build] Error 2
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
This is when I attempt compile it in VC++, though nothing is created. Hopefully someone will be able to help me because I really don't want to use Programmer's Notepad 2 for this, but I suppose if I must, I will.

If it helps, I'm planning to use libgba and hopefully make something for the GBA, not NDS (not sure if it matters, really).

Re: Setting up devkitARM with Visual C++ 2010 Express

Posted: Thu Jun 17, 2010 4:27 pm
by Izhido
The instructions for setting up VC++ are correct, for the most part. There is a problem in the regex, though; linking errors are not captured, so when any error like the one you just posted occurs, VC doesn't get it and reports a succesful compilation. Some time ago, WinterMute helped me with it. This is my 'make' command in my current projects:

Code: Select all

 make 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/' -e 's/\(undefined reference\)/error : \1/' 
With it, you should now see your undefined references in the Errors List window in VC.

As for the actual error in your app, well... I think we need a little more information about your app before giving you more advice :D .

Just one thing: the toolchain expects C sources to have .c as its extension, and C++ sources to have .cpp (at least, when using the default makefile).

Re: Setting up devkitARM with Visual C++ 2010 Express

Posted: Thu Jun 17, 2010 5:51 pm
by vuurrobin
the proces of setting it up for VS2008 is also described here:

http://www.console-dev.de/2009/09/03/cr ... udio-2008/

I'm pretty sure that it works the same for gba projects.

Re: Setting up devkitARM with Visual C++ 2010 Express

Posted: Fri Jun 18, 2010 3:44 pm
by WinterMute
Izhido wrote:The instructions for setting up VC++ are correct, for the most part. There is a problem in the regex, though; linking errors are not captured, so when any error like the one you just posted occurs, VC doesn't get it and reports a succesful compilation. Some time ago, WinterMute helped me with it. This is my 'make' command in my current projects:

Code: Select all

 make 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/' -e 's/\(undefined reference\)/error : \1/' 
This regex is no longer required, the devkitPro build system now filters the errors automatically.
RedChu wrote:

Code: Select all

1>------ Build started: Project: template, Configuration: Debug Win32 ------
1>  linking multiboot
1>  c:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/lib/thumb/gba_crt0.o: In function `CIDExit':
1>  (.init+0x20c): undefined reference to `main'
1>  collect2: ld returned 1 exit status
1>  make[1]: *** [/c/Users/pc/Documents/GBAprojects/template/template/template_mb.elf] Error 1
1>  make: *** [build] Error 2
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
This is when I attempt compile it in VC++, though nothing is created. Hopefully someone will be able to help me because I really don't want to use Programmer's Notepad 2 for this, but I suppose if I must, I will.

If it helps, I'm planning to use libgba and hopefully make something for the GBA, not NDS (not sure if it matters, really).
Looks like you're set up fine, you just haven't defined a main function in your app. This one is usually caused by not putting source files in the source folder in the template.

Re: Setting up devkitARM with Visual C++ 2010 Express

Posted: Sun Jun 20, 2010 6:01 am
by RedChu
WinterMute wrote:Looks like you're set up fine, you just haven't defined a main function in your app. This one is usually caused by not putting source files in the source folder in the template.
I just checked and yeah, the main file wasn't in the source folder (I hadn't actually created a source folder yet).

Also, is there a way to get Intellisense to recognize everything? Right now it's only recognizing a few things, such as irqInit(); (that's the only one I can think of at the moment that is working).