GP2X Gp2x Code::blocks Sdk Rc1


yaustar

UK GP32 & GP2X Owner
Joined
Oct 18, 2003
Messages
2,714
Location
UK
Website
Visit site
Download: http://www.sendspace.com/file/vyc7yo
Updated with the fixed template.
Updated to Rc2 with updated gdb 6.6

Feedback, mistake etc here, I would like to make sure it is ready for prime time before I upload to the GP2X file archive and announce in news. Cheers.

Reademe.txt
CODE
================================================================================
GP2X Code::Blocks complete development setup RC 2
By Steven Yau
Email yaustar_8p@yahoo.co.uk
================================================================================
> What is this?
- This is a complete development environmet for GP2X development as a complate
preconfigured package as many people are still having trouble setting up the
toolchain, IDE, etc from the Wiki.

> What is included?
- Code::Blocks IDE nightly build (10 Aug 2007): http://www.codeblocks.org/
- MinGW compiler: http://www.mingw.org/
- SDL libraries: http://www.libsdl.org/
- DJWillis Open2x SDK: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1918
- Guyfawkes SDL test: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1047
[Modified by me with Code::Blocks project setup and PC build]
- SDL template project by myself based from Lazy Foo's tutorials
http://lazyfoo.net/SDL_tutorials/index.php

> What isn't included?
- A warranty. You run this setup at your own risk. I am not to blame if anything
goes wrong with the PC, GP2X or anything as a result of the use of these
programs.

- Personal support. Please do not PM me for extra help in setting this up. Post
in the release threads and I will do my best to get round to you. This stops the
same problem being sent to me dozens of times.

> How to install
- *IMPORTANT*
To use this, you must delete your current Code::Blocks user settings. This
is the only way that we can get C::B to check for local settings. To delete
your current user settings, go to %APPDATA% (or
C:\Documents and Settings\User_name\Application Data) and delete the
codeblocks folder.

- Decompress the package to the root of the C drive.

- You will have the following folders:
- CodeBlocks
- devkitGP2X
- GP2X Template
- MinGW
- SDL Test

- MinGW and devkitGP2X MUST stay at the root of the C: drive for the pre-config
to work. If you want them somewhere else, you have to change the paths yourself.
The other folders can be moved whereever you want.

- [Skip this step if you don't want to use file association]
- Run Codeblocks.exe. Go to Settings->Environment Settings. On General
settings, tick the box for Check & set file associations and press the
button Set now.

- That's it, everything is ready to go.

> Extra notes on the folders
- SDL Test: This contains a modified version of Guyfawkes SDL test code. The
project can buld either the PC or the GP2X version. The execuatables are built
to the built sub directory.

- GP2X Template
- This is a simple Hello world template that you can copy the entire directory
to start a brand new project. It has been preconfigured for 3 bulid targets:
- PC Debug: You main development build
- PC Release: Optimised build to release to peers/users
- GP2X Release: Optimised build for GP2X platform

- The executables are built to the built sub directory.

- You can change all the settings, output file names etc in Project->Properties.

> Extra notes on running the PC build from the IDE
- Use F8 (Debug->Start), this runs the exe via the debugger and uses the DLLs
from the bin directory in MinGW. If you use F9 or Ctrl+F10 (Build->Build/Run),
it will try to find the DLLs in the working folder which is set in
Project->Properties.

- If you want to run the exe as a separate application (i.e. double clicking on
the exe), then you need to put the SDL DLLs in the same directory as the exe.
They can be in the C:\MinGW\bin directory:
- mingwm10.dll
- SDL.dll
- SDL_image.dll
- SDL_mixer.dll
- SDL_ttf.dll
- SDLgfx.dll
- smpeg.dll
- zlib1.dll
- jpeg.dll
- libfreetype-6.dll
- libogg-0.dll
- libpng12-0.dll
- libtiff-3.dll
- libvorbis-0.dll
- libvorbisfile-3.dll

> Shoutouts
- The entire GP2X development community (too many names;)

================================================================================
RC 2 16 Aug 2007
================================================================================
> What has been added/changed?
- GDB 6.6 has been installed over 6.3

================================================================================
RC 1 16 Aug 2007
================================================================================
> What has been added/changed?
- Everything, it is the first version :)
 
Yaustar,

From some short testing ive done so far I have these observations:

1. You say "MinGW and devkitGP2X MUST stay at the root of the C: drive. The other folders
can be moved whereever you want." I dont believe this to be true, as long as you update all of the paths under the compilers it works. If you dont get changing the path's then in general your statement is true.

2. In your template it appears you forgot to change the output directory for the executable. Both release's are set for bin not built.

Thats it, so far. Debug works! (can we use version GDB 6.6? I just tried it and seems to work) All of the build targets seem to work. SDLTest works.
 
I have another small observation, your defines arnt what I typically use for platform type. So anyone that is going to dev with this make sure you match or change them in the build options. Also the defines arnt consistent with SDLTest and the template, no biggie, just that people are aware.

PLATFORM_GP2X = GP2X
PLATFORM_PC = WIN32
 
Pickle said:
1. You say "MinGW and devkitGP2X MUST stay at the root of the C: drive. The other folders
can be moved whereever you want." I dont believe this to be true, as long as you update all of the paths under the compilers it works. If you dont get changing the path's then in general your statement is true.

That kind of defies the point of a pre-configured setup ;). You are right and it isn't strictly true but for the ease of the setup, it just makes it a ton easier.

QUOTE
2. In your template it appears you forgot to change the output directory for the executable. Both release's are set for bin not built.

Oops.

QUOTE
Thats it, so far. Debug works! (can we use version GDB 6.6? I just tried it and seems to work) All of the build targets seem to work. SDLTest works.
Sweet. :)
 
Last edited by a moderator:
yaustar said:
Pickle said:
1. You say "MinGW and devkitGP2X MUST stay at the root of the C: drive. The other folders
can be moved whereever you want." I dont believe this to be true, as long as you update all of the paths under the compilers it works. If you dont get changing the path's then in general your statement is true.

That kind of defies the point of a pre-configured setup ;).

I know, but in my case I didnt want it all sitting on the C:\, so I moved it to my D:\. You know the real benefit with this setup is that it contains all the prebuilt libs.

yaustar said:
Pickle said:
Thats it, so far. Debug works! (can we use version GDB 6.6? I just tried it and seems to work) All of the build targets seem to work. SDLTest works.

Sweet. :),

You can get version 6.6 from the mingw sourceforge if you want to switch.
 
Last edited by a moderator:
Pickle said:
I know, but in my case I didnt want it all sitting on the C:\, so I moved it to my D:\. You know the real benefit with this setup is that it contains all the prebuilt libs.

Really? I thought the difficulty was getting the whole thing configured from the Wiki? :huh: Maybe a combination of both?

I have uploaded version with the fixed template.
http://www.sendspace.com/file/jjr71d
 
Last edited by a moderator:
yaustar said:
Pickle said:
I know, but in my case I didnt want it all sitting on the C:\, so I moved it to my D:\. You know the real benefit with this setup is that it contains all the prebuilt libs.

Really? I thought the difficulty was getting the whole thing configured from the Wiki? :huh: Maybe a combination of both?
Are you refering to my comment(s) from the other thread? At that point I was a little frustrated. Once I setttled down and really played around with codeblocks compilier setup and got a handle on it it made some sense. Having your first build helped to see which settings needed to be changed.
Dont get me wrong im not saying the entire setup between codeblocks and the compilier and linker is a piece of cake, i.e. you have the debug working and i hadnt gotten it to yet.

In general I guess im trying to say if you want it just work then install it on the C:\, but if you you do want it somewhere else its not to hard to change all of the paths to that location(i.e. C:\ replaced with D:) in the compiler options.
 
Last edited by a moderator:
Pickle said:
Are you refering to my comment(s) from the other thread? At that point I was a little frustrated. Once I setttled down and really played around with codeblocks compilier setup and got a handle on it it made some sense. Having your first build helped to see which settings needed to be changed.
Dont get me wrong im not saying the entire setup between codeblocks and the compilier and linker is a piece of cake, i.e. you have the debug working and i hadnt gotten it to yet.

In general I guess im trying to say if you want it just work then install it on the C:\, but if you you do want it somewhere else its not to hard to change all of the paths to that location(i.e. C:\ replaced with D:) in the compiler options.
Just in general, there was another thread a couple of months ago where people had trouble putting everything together following the Wiki so I quickly made a hacked package purely for GP2X development.
 
Last edited by a moderator:
yaustar said:
Pickle said:
Are you refering to my comment(s) from the other thread? At that point I was a little frustrated. Once I setttled down and really played around with codeblocks compilier setup and got a handle on it it made some sense. Having your first build helped to see which settings needed to be changed.
Dont get me wrong im not saying the entire setup between codeblocks and the compilier and linker is a piece of cake, i.e. you have the debug working and i hadnt gotten it to yet.

In general I guess im trying to say if you want it just work then install it on the C:\, but if you you do want it somewhere else its not to hard to change all of the paths to that location(i.e. C:\ replaced with D:) in the compiler options.
Just in general, there was another thread a couple of months ago where people had trouble putting everything together following the Wiki so I quickly made a hacked package purely for GP2X development.


yeah i know which one your talking about, at this point ill drop the issue and leave it up to you what you want to do.

Did you include gdb 6.6 in your latest upload?
 
Last edited by a moderator:
No, I don't have much experience with the debugger side of the install and just followed the Wiki from Code::Blocks. Are there any major features from the upgrade that would make it worthwhile?
 
yaustar said:
No, I don't have much experience with the debugger side of the install and just followed the Wiki from Code::Blocks. Are there any major features from the upgrade that would make it worthwhile?
Really i cant say that i know, so you complied GDB from scratch then? The one i pulled off was already built. I thought you might know why they refer to 6.3 RC on the wiki but are up to 6.6 RC.
This is all I can find

Posted By: wntrmute
Date: 2007-06-14 17:34
Summary: Snapshot: gdb 6.6

A build of the recent gdb 6.6 release is now available for MinGW. This release includes the patch against the FSF sources should you wish to compile it yourself.
 
Last edited by a moderator:
yaustar said:
I meant I just followed this Wiki guide: http://wiki.codeblocks.org/index.php?title...uild_on_Windows. I will be uploading Rc2 in a second with GDB 6.6.


cool.
(I thought you were refering to a mingw wiki page, confusion solved)

There was one other thing I had to add the path of the bin (all of the SDL DLL) to my PATH variable. Or copy all of the DLL's to a path already in the PATH variable or by the exe itself.
 
Last edited by a moderator:
As long as you are using F8 (Debug run), it would work fine with the dlls in MinGW/bin folder since it is using GDB which is in the same folder. If you use F9 or Ctrl + F10 to run, then it just executes the exe and tries to find the dlls in the working folder (pre configured to ./built). This is in the readme.txt.

CODE
> Extra notes on running the PC build from the IDE
- Use F8 (Debug->Start), this runs the exe via the debugger and uses the DLLs
from the bin directory in MinGW. If you use F9 or Ctrl+F10 (Build->Build/Run),
it will try to find the DLLs in the working folder which is set in
Project->Properties.
 
yaustar said:
As long as you are using F8 (Debug run), it would work fine with the dlls in MinGW/bin folder since it is using GDB which is in the same folder. If you use F9 or Ctrl + F10 to run, then it just executes the exe and tries to find the dlls in the working folder (pre configured to ./built). This is in the readme.txt.

CODE
> Extra notes on running the PC build from the IDE
- Use F8 (Debug->Start), this runs the exe via the debugger and uses the DLLs
from the bin directory in MinGW. If you use F9 or Ctrl+F10 (Build->Build/Run),
it will try to find the DLLs in the working folder which is set in
Project->Properties.
Yeah your right....I ran the exe by itself not through codeblocks.
 
Last edited by a moderator:
Yaustar
RC2 looks good.
Are all the libraries the same version's between the GP2X and the PC? I really only use the SDL stuff, but it may cause issues for others if some the more special libraries are different. I didnt see anything in particular just being it up before you roll it out for the final version.
 
Pickle said:
Yaustar
RC2 looks good.
Are all the libraries the same version's between the GP2X and the PC? I really only use the SDL stuff, but it may cause issues for others if some the more special libraries are different. I didnt see anything in particular just being it up before you roll it out for the final version.
Honestly, I don't think they are. The GP2X libs are slightly behind the official ones on SDL AFAIK. Thanks for the testing, much appreciated.
 
Last edited by a moderator:
yaustar said:
Pickle said:
Yaustar
RC2 looks good.
Are all the libraries the same version's between the GP2X and the PC? I really only use the SDL stuff, but it may cause issues for others if some the more special libraries are different. I didnt see anything in particular just being it up before you roll it out for the final version.
Honestly, I don't think they are. The GP2X libs are slightly behind the official ones on SDL AFAIK. Thanks for the testing, much appreciated.

I think the risk with SDL at the moment is nil, since they are all part of the 1.2 branch, I just wasnt sure about all of the other libs.
No problem with the testing, ive learned a lot the last couple days and I can really use this. The debug to me seems much better and reliable than the GPH devc++ debug. I know a lot people will find this useful and its worth the time to get it right.
 
Last edited by a moderator:
Back
Top