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 > ok can i use msvc++ with devkitadvance

#13658 - Heruk - Sat Dec 20, 2003 12:46 am

ok can i use msvc++ with devkitadvance

#13664 - tepples - Sat Dec 20, 2003 3:01 am

I think that's answered in the Beginner's FAQ.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#13666 - yaustar - Sat Dec 20, 2003 3:26 am

yes, there is a basic tool in gba.org somewhere... to do the hard work for you, else it is a matter of changing lots of options
_________________
[Blog] [Portfolio]

#13668 - Miked0801 - Sat Dec 20, 2003 3:36 am

Not really. Just change your options/directories to point at GCC and devkit stuff, then run GNU make for the files. We use it here without a problem. It takes about 30 seconds to change dev studio back into windows mode if I need to do tools work.

#13699 - Heruk - Sat Dec 20, 2003 11:28 pm

i tried to use gba app wizard and it said theat it cant find the install path and to make sure vc++ is installed correctly

#13707 - yaustar - Sun Dec 21, 2003 2:42 am

Strange, I never had a problem with it (besides that I didn't like it). hmm, I suppose you could go down the Dev C++ route. There is a post somewhere on how to configure it.
_________________
[Blog] [Portfolio]

#13713 - Miked0801 - Sun Dec 21, 2003 6:15 am

Using SN dev system with the wizard stuff? If so, I might be able to help as we use SN and Nintendo Dev stations both w/o issue. Just curious.

#13733 - [Titan] - Sun Dec 21, 2003 8:48 pm

.firstpost :)

for those interested, here's how you can run your gba game from msvc++ 6

what you need: A workspace with project file for your GBA project

go to the menu "tools" -> "customize" and select the "tools" tab. now scroll down the list and create a new tool named "run .GBA program" or whatever you want.
In the "command" field, fill in the location of your emulator (in my case, c:\program files\Visualboy Advance\VisualBoyAdvance.exe)
In the "arguments" field, tpye: "$(TargetPath)" <- include the quotes ( " )

press OK, and go to the menu "tools" (again), there is your emulator tool, see the icon next to it? a little hammer, and a number. Remember that number. Now go to "customize" again, and select the tab "keyboard". Select from the category list "tools", and from the command list "usertool X" (X being the number you just had to remember). Now select the shortcut field, and type the shortcut you want (just press the combination, don't write it out). Make sure you don't take a combination that's already in use (I chose ctrl+shift+F7), and press "close".

final step, and this is the one I hate the most, since you'll have to repeat it for every project you make. Close MSVC++ 6, and open your project file (.dsp) with a text editor (notepad will do). Now find the line
# PROP Target_File "whatever.exe" and change it to # PROP Target_File "whatever.gba" <- (or whatever.bin if you compile to bin files)
be aware that this line is in the file more than once.
save the project file, and open your workspace again. After compiling, press the shortcut you've made, and your ROM should be opened in the emulator. :)

btw, I have the same problem with the wizard. the line "DEVDIR = " doesn't have the correct path after it, just some garbled text (probably some memory address I guess), just replace the garbled text with the correct path (like C:\DevkitAdv\ )

#13784 - Heruk - Mon Dec 22, 2003 7:56 pm

1st thank you all for the replies

2nd
ok
what kind of project do i make Titan
to use your method

#13807 - Heruk - Tue Dec 23, 2003 3:42 am

ICASE YOU THINK MY QUESTION IS STUPID
THE REASON I ASK IS BECAUSE IN THE .DSP FIL I SEE NO LINE THAT READS
# PROP Target_File

SORRY BOUT CAPS
KINDA
;P

#13808 - Heruk - Tue Dec 23, 2003 3:53 am

Is it a make file
.....
any one...

#13809 - Heruk - Tue Dec 23, 2003 4:07 am

ok i figured out that its a make file
;]
pathetic right

how do i edit that line to edit it in the wizard

#13818 - [Titan] - Tue Dec 23, 2003 11:47 am

Heruk wrote:
1st thank you all for the replies

2nd
ok
what kind of project do i make Titan
to use your method


that doesn't really seem to matter, I use WhatZdat's wizard to create a GBA project, but normal win32 console projects seem to have exactly the same project file structure.

the dsp file kind of looks like this:
Code:

# Microsoft Developer Studio Project File - Name="interrupts" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) External Target" 0x0106

CFG=interrupts - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "interrupts.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "interrupts.mak" CFG="interrupts - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "interrupts - Win32 Release" (based on "Win32 (x86) External Target")
!MESSAGE "interrupts - Win32 Debug" (based on "Win32 (x86) External Target")
!MESSAGE

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""

!IF  "$(CFG)" == "interrupts - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Cmd_Line "NMAKE /f interrupts.mak"
# PROP BASE Rebuild_Opt "/a"
# PROP BASE Target_File "interrupts.exe"
# PROP BASE Bsc_Name "interrupts.bsc"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Cmd_Line "NMAKE /f interrupts.mak"
# PROP Rebuild_Opt "/a"
# PROP Target_File "interrupts.exe"
# PROP Bsc_Name "interrupts.bsc"
# PROP Target_Dir ""

!ELSEIF  "$(CFG)" == "interrupts - Win32 Debug"

// here be the same stuff as above, but for debug settings

!ENDIF

# Begin Target

# Name "interrupts - Win32 Release"
# Name "interrupts - Win32 Debug"

!IF  "$(CFG)" == "interrupts - Win32 Release"

!ELSEIF  "$(CFG)" == "interrupts - Win32 Debug"

!ENDIF

# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

//here be all the stuff that includes sourcefiles in your project



you just replace all .exe with .gba :) It's because the Target_file thingy is passed as an argument to your emulator, and we're not building exe's here, but gba files :)

I've had some problems with the wizard not writing the devdir to the file. just look for the following piece of text in your .mak file
Code:

# -------------------------------------------
# Base Directory for gcc arm-agb-elf replace with
# wherever you put your gba devkitadv files.
# -------------------------------------------

DEVDIR  =

and place your directory of devkitadv behind the =
(like c:\devkitadv )

another thing I ran across is
Code:

# -------------------------------------------
# Compiler Directories for binaries, includes and libs.
# -------------------------------------------

CMPDIR  = $(DEVDIR)\bin
LIBDIR  = $(DEVDIR)\lib\gcc-lib\arm-agb-elf\3.0.2\interwork
LIBDIR2 = $(DEVDIR)\arm-agb-elf\lib\interwork
INCDIR  = $(DEVDIR)\lib\gcc-lib\arm-agb-elf\3.0.2\include
INCDIR2 = $(DEVDIR)\arm-agb-elf\include

this works fine if you use release 4 of devkitadvance, but I'm using release 5 beta. When compiling, ld.exe will begin to whine that it doesn't know -lc or -lgcc. That's because the paths are incorrect. change 3.0.2 to 3.2.2 and it should work fine ^_^

#13844 - Heruk - Tue Dec 23, 2003 7:55 pm

cool
thx

but i dont even think im ready for allt his

no tuts ive found really helped me out yet
ive made dx programs
but im kinda confused with this stuff
got a good tut link for the absolute beginner besides the perm?

#13846 - [Titan] - Tue Dec 23, 2003 8:04 pm

Gbajunkie has some nice ones (www.gbajunkie.co.uk).

I assume you already know at least the basics of C, because that's what you'll need at least.

My suggestion is that you start with the first tutorial, and don't even start on the second one until you understand the first one completely.
I wouldn't say GBA programming is difficult, you just have to understand what you're doing, and what the machine does whenever you write to a register.

#13849 - Heruk - Tue Dec 23, 2003 8:50 pm

ty all soooooooooooooooooooooooooo much

#13869 - yaustar - Wed Dec 24, 2003 5:39 am

This may be a bit late, but I remember there was a problem with the tool as it didnt like any spaces in the directories it used such as where the compilar was and where the project was.
_________________
[Blog] [Portfolio]

#13872 - maximAL - Wed Dec 24, 2003 6:20 am

[Titan] wrote:
final step, and this is the one I hate the most, since you'll have to repeat it for every project you make. Close MSVC++ 6, and open your project file (.dsp) with a text editor (notepad will do). Now find the line
# PROP Target_File "whatever.exe" and change it to # PROP Target_File "whatever.gba" <- (or whatever.bin if you compile to bin files)
be aware that this line is in the file more than once.
save the project file, and open your workspace again. After compiling, press the shortcut you've made, and your ROM should be opened in the emulator. :)


are you sure this is necessasy? it worked for me without this, i just entered Project.gba as the target file somewhere under the "project" tab.

#13879 - [Titan] - Wed Dec 24, 2003 12:17 pm

erm... yeah, that's a possibility too. Changing the filename there will probably change the output filename in the project file as well :) That's a whole lot easier than editing the dsp file. thnx. I'm not too familiar with the 4 gazillion features of msvc++ :)

#15266 - maximAL - Tue Jan 20, 2004 5:48 am

does anyone use wintermutes GCC (http://homepage.ntlworld.com/wintermute2002/) with VC++? i hoped i could simply edit the makefile to it's path instead of DKA, but it always gives me errors that something isn't found. do i have to take care of something special? switching between different DKA versions never made problems.