Deving With Vs 2005 C++


BenScar

What does this do again?
Joined
Jan 4, 2006
Messages
435
Age
47
Location
UK, Near London, somewhere...
Website
Visit site
Hello All,

Right I've tried 3 times now, must be doing something wrong somewhere!
I've read the threads, looked at all the error messages and I still can't get this working the way it should (and I want to start making Tic-Tac-Toe!)

I've going though the "gp2x Sdl/coding" thread and got to the part taken from the "GP2X User Guide Version 2.0.0b" that talks about installing the "DevKitGP2X" from the archive. Here I start to get a little confused as there's a couple of dev kits (for Windows).

There's the devkitGP2X-win32.exe which seems to be JUST the dev kit, which I believe is the one mentioned.
Then there's the devkitGP2X.rar which seems to contain the MinSys and a whole bunch of other libraries. Are these other libraries the "Theoddbot’s GP2X SDL libraries" which are also mentioned in the User Guide or are these more funky libraries to play with (better versions or just different ones)?

Once that's sorted out I'll follow the guide (there and moving onto Using Windows .NET Visual C++ 2005 Express Edition as I believe that's the same as the full VS 2005 version)

Thanks for your help
(and I'll be documenting this and any other things I find to see if it'll help out anyone else :) )
 
Last edited by a moderator:
If you follow the exact directions on the Visual C++ 2005 Express wiki page, then it will work for you. I only installed devkitGP2X-win32, though I got mine from the official download site on SourceForge, as linked in the wiki.

You do NOT need MinSys. I don't know what else that devkitGP2X.rar file has in it, but you probably don't need it.
 
slygamer posted on May 23 2006 at 02:44 AM said:
If you follow the exact directions on the Visual C++ 2005 Express wiki page, then it will work for you. I only installed devkitGP2X-win32, though I got mine from the official download site on SourceForge, as linked in the wiki.

You do NOT need MinSys. I don't know what else that devkitGP2X.rar file has in it, but you probably don't need it.
I thank you for your words and will be following them to the letter :)
 
Last edited by a moderator:
BenScar posted on May 22 2006 at 07:09 PM said:
Hello All,

Right I've tried 3 times now, must be doing something wrong somewhere!
I've read the threads, looked at all the error messages and I still can't get this working the way it should (and I want to start making Tic-Tac-Toe!)

I've going though the "gp2x Sdl/coding" thread and got to the part taken from the "GP2X User Guide Version 2.0.0b" that talks about installing the "DevKitGP2X" from the archive. Here I start to get a little confused as there's a couple of dev kits (for Windows).

There's the devkitGP2X-win32.exe which seems to be JUST the dev kit, which I believe is the one mentioned.
Then there's the devkitGP2X.rar which seems to contain the MinSys and a whole bunch of other libraries. Are these other libraries the "Theoddbot’s GP2X SDL libraries" which are also mentioned in the User Guide or are these more funky libraries to play with (better versions or just different ones)?

Once that's sorted out I'll follow the guide (there and moving onto Using Windows .NET Visual C++ 2005 Express Edition as I believe that's the same as the full VS 2005 version)

Thanks for your help
(and I'll be documenting this and any other things I find to see if it'll help out anyone else :) )

I used the docs in the Wiki 2005 tut and the sdk linked on that page, works a treat. The Express edition is not the same as the full version, but everything you need is there. If your going to compile for windows too then your also need the Windows SDK. All the info is on the MS site where you got 2005 from.

One thing I found is that building for Windows and gp2x in the same project was awkward, 2005 kept forgetting stuff. Now the project is 100% gp2x I get no problems.

The other sdk you talk about is I think the one gamepark just release? I looked at that and the gcc part is the same version, its just got dev++ and some other stuff rolled into it. Looks good but if your like my and find it hard to move from MS dev studio then go for the 2005 option.

It took me a few goes to get it working, mostly my errors. Make sure your env path has the gp2x bin dirs set up. Here is the gp2x part of my PATH var

C:\devkitGP2X\bin;C:\devkitGP2X\arm-linux\bin;C:\devkitGP2X\libexec\gcc\arm-linux\4.0.2;

I've got mine all setup to copy the data and exec to the gp2x over the network, the only thing missing is debugging but I get live with that. Its ace! Better than Sony stuff i've used in the past, although SN are making it all better.
 
Last edited by a moderator:
Got a little way into this and found two little problems.
3. Download devkitGP2X from SourceForge. The devkitPro Installer currently does not support devkitGP2X.
4. Extract devkitGP2X to c:\devkitpro, so you end up with a devkitGP2X folder inside c:\devkitpro. This is the convention recommended by devkitPro so you can have multiple devkitPro distributions in the one location.
5. Note: If you chose a development directory other than \devkitGP2X, you will need to correct the paths in "bin\arm-linux-sdl-config" and "demo\Makefile".
6. Add the bin directories to your PATH. Click on Start->Settings->Control Panel, open System->Advanced->Environmnet Variables, select PATH and add c:\devkitpro\devkitGP2X\bin;c:\devkitpro\devkitGP2X\minsys\bin; to your path.

Two little issues.
1. There is no "bin\arm-linux-sdl-config" (that I could find) in the "devkitGP2X-1-win32.exe" file when expanded, so even if I had expanded it to a different path (which I didn't) I couldn't change it. But I assume it's needed to tell other things where to find the compiler for the arm SDL "things"
2. Text in GuyFawkes guide says that it installed to "c:\devkitgp2x\" where as the Wiki says to use the "default" path. Looking at the guide again it seems that's for command line development, rather than generic installation. So I'm going to ignore that one :)

Am I getting hung up on the details and making this more complicated than it needs to be, or simply missing something ?

Thanks for any help you can give.
Ben

PS any chance I can get a copy of someone else devkitGP2X folder and run with that? See if that makes any difference!
---
 
I'll have to fix that. That's the problem with a wiki. Other people can change it, but change it to something wrong or unnecessary. Keeping a wiki page correct is quite difficult.
 
BenScar posted on May 23 2006 at 05:50 PM said:
PS any chance I can get a copy of someone else devkitGP2X folder and run with that? See if that makes any difference!
---
Yer sure, i've put it here.....devkitGP2X.zip Its also got a blank link,bin and 940 file aswell as the rules file and my magic batch file used in the link stage of the 940 target.



Its 50 megs and i've just started the upload so give it 20mins from the time of this post before grabbing it.
 
Last edited by a moderator:
MadDog posted on May 24 2006 at 08:30 PM said:
Yer sure at i've put it here.....devkitGP2X.zip Its also got a blank link,bin and 940 file aswell as the rules file and my magic batch file used in the link stage of the 940 target.
You are a gentleman. I'll grab it now, see what I can get going with it.
I'm really looking forward to be able to actually develop something (perhaps even something useful or fun ;) )

If all goes well I might add something to the Wiki (assuming I understand what I'm doing myself!) and upload your file to Archive.
 
Last edited by a moderator:
Next stage...
MadDog using your SDK file (Thanks for that), and using the one I got (which looked incomplete compared to yours) I get the same thing.

With the following files:
2xdeving3cn.jpg

I get nothing out at all.
Here's the BuildLog.htm that the complie generates. Seems it's not making the .o files from the .c ones.

Anyone got any ideas why?
Could it be the "Tool Build Order"? (tried it different ways!)
This is what I have at the moment:
2xdeving2.jpg


Looking though the Wiki, I found that steps 7/8 (of the section "Customizing to compile for your GP2X") mentions:
7. Open the GCC Linker category and select the General property page.
8. Fill in any additional library paths and libraries needed to build your project.
1. For SDL: Under "Additional Include Paths" ...​
The "Additional Include Paths" doesn't show up under the "GCC linker", but it is in the "GCC Complier"
Is this any different in the VS C++ Express Edition?
slygamer I can understand how hard it is to keep that Wiki page up to date, can't be easy making sure it's correct all the time!

Fingers crossed I've just done something silly (please!)
 
BenScar posted on May 25 2006 at 11:40 AM said:
Next stage...
MadDog using your SDK file (Thanks for that), and using the one I got (which looked incomplete compared to yours) I get the same thing.

With the following files:
2xdeving3cn.jpg

I get nothing out at all.
Here's the BuildLog.htm that the complie generates. Seems it's not making the .o files from the .c ones.

Anyone got any ideas why?
Could it be the "Tool Build Order"? (tried it different ways!)
This is what I have at the moment:
2xdeving2.jpg


Looking though the Wiki, I found that steps 7/8 (of the section "Customizing to compile for your GP2X") mentions:
7. Open the GCC Linker category and select the General property page.
8. Fill in any additional library paths and libraries needed to build your project.
1. For SDL: Under "Additional Include Paths" ...​
The "Additional Include Paths" doesn't show up under the "GCC linker", but it is in the "GCC Complier"
Is this any different in the VS C++ Express Edition?
slygamer I can understand how hard it is to keep that Wiki page up to date, can't be easy making sure it's correct all the time!

Fingers crossed I've just done something silly (please!)

Have you made sure the gcc rule has been enabled for your project, its not by default. The error you have i've seen when the 'tool' is not set to the gcc compiler.

Mine has the sdl stuff too.
 
Last edited by a moderator:
MadDog posted on May 25 2006 at 01:31 PM said:
Have you made sure the gcc rule has been enabled for your project, its not by default. The error you have i've seen when the 'tool' is not set to the gcc compiler.

Mine has the sdl stuff too.
I've doubled checked, yep, the "GCC Complier" option is ticked in the "Custom Build Rules" section.
Also made sure that the "GCC Linker" is below the "Linker Tool" entry in the "Build Tool Order"

When you say your's has the SDL stuff in it, what did you mean?
The path in the "Additional Include Path" section?

Thanks
Ben
---
 
Last edited by a moderator:
No, I just got the SDL libs and stuff wich is why my sdk folder differs a bit from the one on the archive. Any chance of sending me your project? I'll give it a go.
 
MadDog posted on May 25 2006 at 04:32 PM said:
No, I just got the SDL libs and stuff wich is why my sdk folder differs a bit from the one on the archive. Any chance of sending me your project? I'll give it a go.
Ah got you, there are some things in the BIN folder as well that aren't in the one I downloaded off SourceForge. I belive it's something to do with it being the "Octoate's" tool chain, which is more libraries than the normal one.

If you'd like to make a new project, I've simply added the three files in this achive (here) and then the "link.link" file (also tried adding the .940 and .bin files as well, alas no different results)
I have just realised I added the .h file to the "Header Files" section and the two .c files to the "Source Files" section. Not sure if that has any bearing on it though as the files didn't move.

Appreciate your help with this.

Ben
---
 
Last edited by a moderator:
Not sure if that would help, its the actual project file I wanted to try out of you. I'll try the source files later, i'm about to pop out to see X men! :)
 
MadDog posted on May 25 2006 at 06:49 PM said:
Not sure if that would help, its the actual project file I wanted to try out of you. I'll try the source files later, i'm about to pop out to see X men! :)
Lucky sod! I want to see that, although I get the pleasure of going camping this bank holiday :)
Anyway, project files have been uploaded to gp2xtesting.zip, there is a slight difference in that my path to the custom rules are as stated in the Wiki aritcle (C:\devkitpro\devkitGP2X) and I got the file name wrong, calling it "arm-rules.rules" instead of "arm-linux.rules" so you might need to change that.
The link.940, link.bin and link.link files all exist in the C:\devkitpro\devkitGP2X\ so aren't in the archive.

Thanks for testing this out for me, hope you like the film, looks cracking!

Ben
---
 
Last edited by a moderator:
Hi, just got back, yer good film. Anyway i'm getting your error, i'm having a look now, its a real odd one.

Ok, got it compiling. I made a dir devkitpro which had a devkitGP2x and copied and renamed it to what you had and I got the errors you did. I switch the rules file for the one in my folder, which is c:\devkitGP2X and it works. I don't know if its the rules file name or the path but thats all I can see thats difference. From what I can tell there is no reason why this is so but I sugest you use c:\devkitGP2X and arm-linux.rules for the rules file. But of a bummer being tiered to a dir structure but better than no build. :)

Also your project had all the trigger files added, these are mutally exclusve, for your project you only need the .link file.
 
MadDog posted on May 25 2006 at 11:41 PM said:
Hi at just got back at yer good film.
:) Just have to convice the wife she wants to go and see it now!

MadDog posted on May 25 2006 at 11:41 PM said:
Anyway i'm getting your error, i'm having a look now, its a real odd one.

Ok, got it compiling. I made a dir devkitpro which had a devkitGP2x and copied and renamed it to what you had and I got the errors you did. I switch the rules file for the one in my folder, which is c:\devkitGP2X and it works. I don't know if its the rules file name or the path but thats all I can see thats difference. From what I can tell there is no reason why this is so but I sugest you use c:\devkitGP2X and arm-linux.rules for the rules file. Bit of a bummer being tiered to a dir structure but better than no build. :)
YAY!!! I thank you for all your hard work. It now at least tries to complie.
I'm missing quite a lot of the include files gp2x.c but I can tell it would like to complie.
Have to see what I can do about making it run the way I want to, rather than using all those lovely includes... Wonder how many of them are actually used...

Odd that it wouldn't work work with the additional path, might have to look into that (when I know all about that sort of thing!!)

MadDog posted on May 25 2006 at 11:41 PM said:
Also your project had all the trigger files added, these are mutally exclusve, for your project you only need the .link file.
I guessed as much, just clutching at straws by that point.


Right, now time to start learning SDL and more C++
Having always used VB and .NET I've not had to worry about compliers, libraries and includes all that much, so I believe there will be somewhat of a learning curve, it's all good though!

Edit:
Out of interest I renamed my arm-rules.rules to arm-linux.rules and volia, it seems to start compling! (Still errors with the includes mind you)

I'll play with it some more next week once I'm back....

Very strange, although it serves me right for not following the Wiki properly! :)
 
Last edited by a moderator:
MadDog calling MadDog.... :)
(or anyone else who can help a poor VB programmer trying to grow up! ;) )

I think I've got something else wrong now... It now all seems to work, it complies the .c files into .o files.
Sadly it's now telling me it can't find even the simplest commands.

I currently have this as a VERY basic test:
Code:
#include "SDL/SDL.h"

int main( int argc, char* args[] )
{
	//Start SDL
	SDL_Init( SDL_INIT_EVERYTHING );
	
	//Quit SDL
	SDL_Quit();
	
	return 0;	
}

The "output" window in the VS shows this:
------ Build started: Project: GP2xTesting, Configuration: Debug Win32 ------
main.c
Linking GP2xTesting.gpe...
Debug\main.o: In function `main':
main.c:(.text+0x1c): undefined reference to `SDL_Init'
main.c:(.text+0x20): undefined reference to `SDL_Quit'
Build log was saved at "file://d:\profiles\ScarboroB\My Documents\Visual Studio 2005\Projects\GP2xTesting\Debug\BuildLog.htm"
GP2xTesting - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
So I assumed it wasn't finding the SDL.h file, sadly there's no mention of that. When I mis-spell the path to the SDL includes (either in the #include statment OR in the "Additional Include Paths" propery) it tells me it can't find the SDL.h file, so now I'm a little stumped.

You can see the full BuildLog.htm here. Is there anything I'm missing?
 
Back
Top