GP2X Codeblocks Setup Help


Vilmos

Member
Joined
Jan 17, 2006
Messages
136
Location
Ontario, Canada
Website
Visit site
Ok so I got my GP2X, I downloaded all the kits, read the wiki and actually did pretty well for getting all set up I think. I got the SDL test to compile and run on the GP2X. (Yay!)

The wiki and the devkit are excellent, but now my problem is that I'd like to be able to cross compile on Windows and the GP2X. This is a problem because most of my coding is for PalmOS so I don't actually know how to get the Windows part to compile in codeblocks.

Can anyone help me do the compiler setup for CodeBlocks? As I said the GP2X part works, but I don't know what I need to do to get an SDL program to also compile for Windows.

Thanks!
 
It should have the default minigw compiler setup configured for you.
Download the minigw libaries for SDL from SDL's site (SDL-devel-1.2.9-mingw32.tar.gz)
Copy the libs and header files to the correct place (done in pretty much the same way as the GP2X setup expect the minigw compiler folder will be in CodeBlocks directory) and link to them when you use it in the same way as GP2X.
 
Oops I just pointed to the sdl libs I already had for the GP2X. I guess I should have known better. Thanks, I'll give that a shot.

I figured I must have sone something silly since I don't normally do the windows programming.
 
Vilmos posted on Mar 25 2006 at 04:03 PM said:
Ok so I got my GP2X, I downloaded all the kits, read the wiki and actually did pretty well for getting all set up I think. I got the SDL test to compile and run on the GP2X. (Yay!)

The wiki and the devkit are excellent, but now my problem is that I'd like to be able to cross compile on Windows and the GP2X. This is a problem because most of my coding is for PalmOS so I don't actually know how to get the Windows part to compile in codeblocks.

Can anyone help me do the compiler setup for CodeBlocks? As I said the GP2X part works, but I don't know what I need to do to get an SDL program to also compile for Windows.

Thanks!

Ahh Vilmos my friend, good to see you here :)

Theres some handy unzip-and-go Windows setups if thats your trick or until you get the hang of things :)

jeff
 
Last edited by a moderator:
Thanks! I appreciate the welcome. :D

I grabbed the windows setup and everything works great for the GP2X but I managed to bork up the SDL for windows by pointing to the GP2X version. Heh wasn't thinking.

It will take a while to get to the fun stuff yet though.
 
Shouldn't be too bad -- being Linux, its more or less like a desktop at the surface, so you can get productive extremely fast; you can delve more into it to get at the blitter hardware function and get into the nooks and crannies, but thats all icing on the cake :p

jeff
 
Ok I'm still not getting the windows compiling part...

I've put SDL in but the problem now is that I need SDL_mixer, SDL_ttf, SDL_image etc.

The compiler is set up, the main SDL part compiles fine but it is choking on the extra libs.

I've downloaded the source, binary for windows and the dev version for VC, but none of these seem to give the lib in a format that Codeblocks likes. So do I need to compile these myself or can I get versions that work with mingw already?
 
I haven't bothered with any of the SDL ports myself, just sticking with linux-isms or Rlyeh's minilib for direct framebuffer and such. There are a few SDLs (the one they include, for an old old gcc version, and a software version, and a hardware modified one, etc.)

For simplicity, maybe just get one of the simple unzip-and-go gcc's, and use rlyeh's minilib?

Hell, I've got it around.. I could just zip up my whole directory :p

ie: Install is just MSYS (from the mingw project, its a mini-cygwin), then unzip and go.

If its anything like the GP32, I'm sure theres 10 different and incompatible builds of tools around so maybe its difficult .. if so let me know and I'll dig up my many-months-old but working downloads from wherever I got them, before I made my own cross compiler setup :p

jeff
 
Hmm, I have the gcc devkit working fine with the gp2x and it works fine with windows as well until I try the sdltest program then it dies from linker errors as half the libraries are missing from mingw.

I'm trying to get SDL working because I've got SDL ported for PalmOS as well with HW accel for the Zodiac or straight software for generic palms. I've also got libmad and mikmod running and sdl_mixer so I'm getting to the point of having a cross compile for palmos, windows or gp2x...

The only real module I need is SDL_mixer as the plain SDL is compiling. I was just doing the extras for the sdltest program but I don't really need all of them.

I'm using CodeBlocks because I am spoiled by CW and want a nice graphical compiler. :) That may have been my first mistake but I have never braved linux or gcc before so I don't have a clue how to get that working at all. I thought a nice tutorial from the wiki would get me going but it appears to be lacking the windows setup side.
 
Getting slightly confused here.

Are you trying to compile the SDL Test using Codeblocks for the GP2X and failing?

I wrote the tutorial for setting up codeblocks on the Wiki so I am interested in which part you are having trouble with ;).
 
yaustar posted on Mar 27 2006 at 10:00 PM said:
Getting slightly confused here.

Are you trying to compile the SDL Test using Codeblocks for the GP2X and failing?

I wrote the tutorial for setting up codeblocks on the Wiki so I am interested in which part you are having trouble with ;).

I followed the Codeblocks setup for the GP2X and it works fine. Now I was under the (quite possibly) mistaken impression that I could also make a target for win32 and then also compile it and get it to run on Windows as well.

I was hoping to avoid using three IDE's to compile for 3 platforms (palmos, windows and gp2x).

Lets start from the top, can I compile a project to both gp2x and windows from Codeblocks?
 
Last edited by a moderator:
Yes you can, but you have to point to different libraries and different compliers for different targets.
 
Vilmos, had you any progress in compiling for windows in codeblocks?
i tried it too... downloaded most of the required libs für win32...
but i had no luck
 
it worked fine for me too... it's a very good tutorial...

but it's for compiling code for the gp2x and i also want to compile the code for windows... and there is no tutorial for that :(
 
ah!

I have been having the same problem as you, so going to try out that guide and see what happens.
 
Back
Top