Pre-configured Codeblocks Sdk Rc5


yaustar

UK GP32 & GP2X Owner
Joined
Oct 18, 2003
Messages
2,714
Location
UK
Website
Visit site
This is a complete development environment for GP2X development as a complete
preconfigured package as many people are still having trouble setting up the
toolchain, IDE, etc from the Wiki.

Download:
Sendspace: http://www.sendspace.com/file/mnzmvw
GP2X Archive: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,2295 [When updated]
[cut]
QUOTE
================================================================================
GP2X Code::Blocks complete development setup RC 5
By Steven Yau
Email yaustar_8p@yahoo.co.uk
================================================================================
> What is this?
- This is a complete development environment for GP2X development as a complete
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/
- Octoate's DevkitGP2x SDK (6 March 2006):
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1362
+ Guyfawke updated SDL libraries (21 October 2006):
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,19,1875
- 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
- DevKitGP2x GPL Release: Optimised build for GP2X platform using the
DevkitGP2x SDK and GPLed SDL_mixer library
- DevKitGP2x LGPL Release: Optimised build for GP2X platform using the
DevkitGP2x SDK and LGPLed SDL_mixer library

- The executables are built to the built sub directory.

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

> LGPL and GPL issues
- *IMPORTANT*
- DevKitGP2x GPL libmad with SDL_mixer for faster MP3 playback. This means that
if you use the DevKitGP2X SDK and SDL_mixer for ANY audio playback, your program
MUST be under GPL since the SDL_mixer has included libmad headers in the library
binary.
- DevKitGP2x LGPL uses libsmpeg with SDL_mixer that uses floats for MP3 playback which
means that LGPL is applied as standard.

> 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

> Known issues
- On the LGPL/Open2x build target, sound playback doesn't work. Currently
finding out why.

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

================================================================================
RC 5 29 Aug 2007
================================================================================
> What has been added/changed?
- Fixed template to output the right file type on LGP.
- Removed Open2x due to difficulty with SDL_mixer.
- Made a SDL LGPL version of DevKitGP2X by creating a second lib folder.

================================================================================
RC 4 20 Aug 2007
================================================================================
> What has been added/changed?
- Added both DevkitGP2x (GPL) SDK and Open2X (LGPL)
- Hopefully Vista support
- Configured the SDL test and template to use both compiles as separate build
targets.

================================================================================
RC 3 18 Aug 2007
================================================================================
> What has been added/changed?
- Updated the SDL libraries for Open2x

================================================================================
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 :)

[/cut]
 
I'm still not able to debug/compile on Windows Vista. I'm a n00b and have no clue what's wrong with it.
 
geo12 said:
I'm still not able to debug/compile on Windows Vista. I'm a n00b and have no clue what's wrong with it.
vista has too many bugs and incompatibilities, im not sure this is causing it, but im just saying, vista = :(
 
Last edited by a moderator:
there are 2 editions types of Vista: 32bit, 64bit...

I run Windows 2003 Server 64bit Edition.
And GDB doesn't work on it 8) But debug builds run fine w/o debugger.
Just telling the fact. And I need no help with it. It's understandable.

With my home PC (Win XP 32 bit), there are no probs 8)

-------------------
There's one minor request for MinGW GP2x template:
a test build should have active the root folder \ of the project, but not the \built\ folder

At least it doesn't coinside with all the rest default templates, that come with CodeBlocks.

So, with the RC i have to move my data files into build folder to test
 
Cool, cheers for the update. I make a mental note of the debugger issue and address when I get a chance.

The working directory is something of a trait I picked up over the years to distinctly separate the data from the source. The idea is that you could just zip up the built folder whenever you need to give someone a build in one go without trouble.

I have uploaded the project file for the template so that the working directory is in the project instead for you to use: http://www.sendspace.com/file/af685d
 
MajorShake said:
vista has too many bugs and incompatibilities, im not sure this is causing it, but im just saying, vista = :(
pretty off-topic, but i'm gonna have to second that. i recently learned that vista doesn't allow hardware audio acceleration in most cases. so people with super high-end cards for nice playback can't use them...also advanced positional audio for games has to be done in software...avoid avoid avoid. but it will be cool if this means openAL gets even more support.
 
Last edited by a moderator:
I'm not entirely sure what I did, but it's working now. Thanks for all the help.

EDIT:
A new problem arises: When I try to run the template, a message comes up saying that SDL.dll could not be found. SDL.dll is in C:\MinGW\bin with all the other dll's. Do I need to edit the paths? Sry for being a super-noob!!
 
This was explained in the readme document. However since GDB doesn't work under Vista, you can either:

1) Move all the .dlls to the Windows system32 directory
2) Modify the Windows environment path so that it also contains C:\MinGW\bin
3) Copy and paste the .dlls from bin to the built folder in the Template project
 
I don't suppose anyone has a Linux (esp Ubuntu) version of this, do they? Or at least post which files can transfer directly, and which can't... and maybe a pointer to setup hints already on the board? Thanx.
-E
 
It is a very nice project, but unfortunately, I haven't bee able to go further than that point:
sdl_path.png


Any suggestions?
 
I've figured out the sdl problem: I need to choose "empty program" unstead of sdl...

And I've been able to import my project from DEV-C++, but, when I built it, I get this error:

ld.exe:: cannot find -lSDL_inifile
:: === Build finished: 1 errors, 0 warnings ===

Damn! I hate build error :/
 
This is exactly the reason why I created a template project in this package as mentioned in the readme.
 
I am trying to devkitGP2X to compile on Vista. At first I got an error saying that it coudnt find cc1.exe, so I added C:\devkitGP2X\libexec\gcc\arm-linux\4.0.2 to the additional paths in toolchain executables.

Then I had an error saying that arm-linux-c++ coudnt find ld.exe and as.exe so I added C:\devkitGP2X\arm-linux\bin to the additional paths in toolchain executables.

The last error I have got is ld: crt1.o: No such file: No such file or directory

But I definatly have it in the devkit and have even directly linked to it.

Reading the build log I get lots of
ignoring nonexistent directory "/usr/local/devkitPro/devkitGP2X/include/c++/4.0.2"
ignoring nonexistent directory "/usr/local/devkitPro/devkitGP2X/include/c++/4.0.2/arm-linux"
type of messages.

But it the end it seems it does seem
to get the correct paths like
C:\devkitGP2X\include\c++\4.0.2\arm-linux
C:\devkitGP2X\include\c++\4.0.2\backward

Has anyone else had this error?

Another confusing thing is that I always seem to get -mwindows linked at the end of all my projects, this dosn't seem normal if I am compiling for the gp2x?
 
@kouky: RC5 is the most recent version I made.

@Uprising: I apologise for the lack of Vista support but I honestly don't have a copy of Vista to test it with.
 
Would there be anyway you could put together an Ubuntu version of this which is setup in a similar way so that projects are almost drag and drop then compile?

I ask since I'm still finding it quite difficult to get things to compile... I have to reboot into XP if I want to boot compile my GP2X release.
 
yaustar said:
@kouky: RC5 is the most recent version I made.

@Uprising: I apologise for the lack of Vista support but I honestly don't have a copy of Vista to test it with.
Hey don't apologise, much appreciated that you have made this package. :)

It gives me a reason to have a go at linux, that was until I just read PokeParadox post! I really dont want to go back and install xp. :p
 
Last edited by a moderator:
Back
Top