GP32 Getting Into C++...


Azure

Trust the recursion...
Joined
May 21, 2003
Messages
3,805
Location
California, USA
I'm finally getting into C++, now that it's the Summer, and I'm using this guide, but what compiler should I use when following the guide and where can I download it?

They have a compiler section and it has 4 guides for compiling with 4 different compilers, but I don't have any of them, so I thought that a link would be provided in the guide for the compiler but there weren't any.
 
What platform are you using (Windows / Linux)? Mirkos' page has links to compilers for either platform that work fine, but you'll have to add in either the official SDK, or his SDK.

Also, if you're on Windows, you may find Devkit Advance to be a little more user friendly.
 
I'm using XP. Wait, so Devkit Advance is a compiler? What about Microsoft Visual C++? Should I get that? Also, what's this SDK stuff that I always hear about?

EDIT: Also, what about this book? Should I buy that one? Or should I buy this one?
 
I'm using XP. Wait, so Devkit Advance is a compiler? What about Microsoft Visual C++? Should I get that? Also, what's this SDK stuff that I always hear about?

EDIT: Also, what about this book? Should I buy that one? Or should I buy this one?
IIRC, Devkit Advance includes a port of GCC or similar compiler, and just gives you a better IDE to work with it.

I wouldn't bother with MSVC++, Microsoft's compilers are known for their buggy and nonstandard nature.

The SDK (software development kit) is a library you link your program to that gives you the functions to write to the screen, access the memory card, play sounds, and read input from the joystick. Without one, you'll be able to write code that'll execute on the GP32, but you won't be able to interact with the user in any way. :)

IIRC, Devkit Advance (with the GP32 addon stuff) includes an SDK, but I'm not entirely sure since I'm using Linux and Mr. Mirkos' SDK.

If you're looking for a C++ reference, I'd go with the O'Reilly book, as their books generally include a lot of simple and useful code examples that you can drop right into your programs. Plus, they're organized in a manner that makes it easy to track down what you're looking for.

As well, my University CS department has a few beginner's C++ tutorials. The console input and output stuff won't apply to Gamepark development (as it has no console), but the basics of building objects and stuff will probably be helpful for those less familiar with object oriented programming.
 
Last edited by a moderator:
I wouldn't bother with MSVC++, Microsoft's compilers are known for their buggy and nonstandard nature.
MSVC++ is the standard, I'm afraid, seeing as it is used to compile about 90% of all commercial games out there, and a similar proportion of applications. It's also one of the best compilers around in terms of finished code efficiency and compilation speed. Just about the only real reasons to avoid it are the annoying proprietary headers (StdAfx.h... gah!... but those can be avoided) and the fact it's big, evil Microsoft.

And I guess cash, although the VS.NET C compiler is available for free, and pretty much anyone doing small projects hasn't paid for it (or pays for it at a vast discount for educational use).
 
Last edited by a moderator:
It's also one of the best compilers around in terms of finished code efficiency and compilation speed. Just about the only real reasons to avoid it are the annoying proprietary headers (StdAfx.h... gah!... but those can be avoided) and the fact it's big, evil Microsoft.
Well, I'd say that for the ARM platform, GCC efficiency (with -O flags) is as good as MSVC++, and that for any gamepark app you could care to write the compile time isn't an issue.

And the proprietary headers thing is the main reason I avoid it... I'm not the world's greatest C/C++ coder (since I spend most of my time using higher-level languages), so I like to know that it's going to work as expected, especially since debugging GP32 apps is more painful than debugging standard Linux apps.

That being said, if MSVC++ is the standard on the Windows side of things, then there's probably a lot of tools built for it and a lot of help available, so that may cancel out the annoyance factors.
 
Last edited by a moderator:
Ok, so let me get this straight. I should use devkit advance with the GP32 SDK when following the C++ tutorial? So, the SDK allows me to "interact" with the user? So, without it, the program would basically just be like an animation where the user cannot do anything but watch (Without being able to start/stop it)? Ok, so where can I dl devkit advance? And what's this talk of IDE?
 
azure said:
Ok, so let me get this straight. I should use devkit advance with the GP32 SDK when following the C++ tutorial?
Well, yeah, except I believe that once you've installed the version of DevkitAdvance for use with the GP32, it'll already have an SDK included, probably the official SDK.
azure said:
So, without it, the program would basically just be like an animation where the user cannot do anything but watch (Without being able to start/stop it)?
Well, without a devkit, your program wouldn't be able to write to the screen or anything. So, basically, it could move some numbers around, but that'd be it. ;)
azure said:
And what's this talk of IDE?
IDE stands for Integrated Development Environment, and I believe that Devkit Advance is an IDE. GP32iDE is probably another competing one. I, personally, don't use an IDE, just a text editor and a compiler, but that's a lot more complicated to get going with if you've never programmed in C/C++ before.
 
Last edited by a moderator:
Ok, so I think I got everything set up. But WinterMute brought it to my attention that that guide is mainly for the PC. So some of the things in there that I will learn won't work for the GP32. So, how should I start learning to program for the GP32? Any specific guides for doing this? Oh yeah, what I'd really like to know is how to make an .exe with an editor. With the textpad that I set up, I can only make .fxe files when I "make." Also, what's the difference between a source file and makefile? Like, what's the difference between the material that you put into these two files?
 
Everyone seems to be learning to program now the summer has arrived :)

I am learning to code a little on PC before jumping to GP32, I would reccomend you do the same. DevKitAdv is only for gp32/gba, so it wont make exe's (i think), I am also following a PC guide and have been using lcc-win32 to compile, it is pretty easy to use.

Oh I am learning C first though, and then later I want to learn CPP.
 
You can't use MSVC++ for GP32 because it doesn't include an ARM compiler to my knowledge. You can still use it as your IDE through use of Batch files, but seriously there are better IDEs out there (I use MSVC++ as my IDE because I'm familiar with it from other projects).

I always recommend Rico's tutorial, even if it's a little dated.

http://www.thaworx.co.uk/ninja/tut1.htm


Edit: Wait, are you talking about coding and compiling on any system, or for the GP32?
 
When I use textpad to compile, it compiles for the GP32. I want it to compile for the PC so I can test out on the PC when following the guide. How can I set it to compile for the PC? BTW, I have Mirko's SDK installed, along with DevKitARM.
 
I think everyone is confused (including myself)

Heres my take on it; he is using a guide for PC, so therefore he needs a PC compiler, so he cant use the GP32 ones.

Search the net for a free C++ compiler.
 
I've been using Textpad to compile recently, as I was told that I should use that to compile. If I shouldn't use that, should I just use DevkitARM? And one thing I was wondering, how do I run the DevkitARM compiler? I couldn't find any executable. Also, to compile something, would I just open the source file and the makefile in the compiler?
 
Wait, are you looking to compile for PC or GP32? Cause I am still VERY confused.

Check this thread for PC compilers.
 
Last edited by a moderator:
Back
Top