Code::blocks + Codesourcery + Sdl Setup


gruso

thunderbox
Joined
Feb 28, 2008
Messages
7,461
Age
47
Location
Sydney, Australia
Website
pandorapress.net
I hate being the newb, but here goes. I've already done a heap of reading (here and on the Code::Blocks forum) and a bit of fiddling, in the hope of avoiding overly broad "how do I dev" type questions.

I started with the HowToWinGP2X.pdf tutorial, eventually setting it up with near-success. I initially had the Code::Blocks error message "There is no disk in the drive" which I overcame by reconfiguring my drive letter assignments. I'm currently dealing with "can't find SDL.dll", but I have the LazyFoo tutorial bookmarked so I'm not asking about that here. I've also installed the CodeSourcery toolchain, I'm only vaguely aware of what that means, but onward we go.

In fiddling with SDL installation, I've become a little overloaded with information. I guess I'm trying to achieve two things here at once; set up the GP2X dev environment, and adapt it for Pandora with the use of CodeSourcery. Not a great idea for a newbie, so I'm going to start from scratch - by uninstalling everything, then installing Code::Blocks, CodeSourcery and SDL one step at a time. I think I'll learn more this way.

Here comes the newb question. What, using diagrams where neccessary, is the relation between Code::Blocks and CodeSourcery? And how do I configure one to "connect" it to the other? I've found these settings:



And more generally, any thoughts on my direction so far? As far as garden paths go, am I on the right one? Am I asking the right questions? I'm a lost lamb right now, but a good learner.

Thanks for reading. :)
 
Gruso said:
I hate being the newb, but here goes. I've already done a heap of reading (here and on the Code::Blocks forum) and a bit of fiddling, in the hope of avoiding overly broad "how do I dev" type questions.

I started with the HowToWinGP2X.pdf tutorial, eventually setting it up with near-success. I initially had the Code::Blocks error message "There is no disk in the drive" which I overcame by reconfiguring my drive letter assignments. I'm currently dealing with "can't find SDL.dll", but I have the LazyFoo tutorial bookmarked so I'm not asking about that here. I've also installed the CodeSourcery toolchain, I'm only vaguely aware of what that means, but onward we go.

In fiddling with SDL installation, I've become a little overloaded with information. I guess I'm trying to achieve two things here at once; set up the GP2X dev environment, and adapt it for Pandora with the use of CodeSourcery. Not a great idea for a newbie, so I'm going to start from scratch - by uninstalling everything, then installing Code::Blocks, CodeSourcery and SDL one step at a time. I think I'll learn more this way.

Here comes the newb question. What, using diagrams where neccessary, is the relation between Code::Blocks and CodeSourcery? And how do I configure one to "connect" it to the other? I've found these settings:



And more generally, any thoughts on my direction so far? As far as garden paths go, am I on the right one? Am I asking the right questions? I'm a lost lamb right now, but a good learner.

Thanks for reading. :)


First do you know theres a prepackaged gp2x kit with C::B and the toolchain?

"can't find SDL.dll" is probally a $path problem, where are you putting SDL.dll? system32? you could place it in the same folder as the exe.

1st you need to add a new compiler and then setup up the paths to the gnu tools (codesourcery). Also add search paths for headers and libs.
It may help you to start with the prebuilt one and try to see what we did to setup it up.
 
Last edited by a moderator:
Pickle said:
First do you know theres a prepackaged gp2x kit with C::B and the toolchain?
Yep - that's what I installed to start with. But compiling for Pandora requires the CodeSourcery toolchain from what I gather, not the one included in the GP2X kit? I figured that if I installed and configured the necessary components separately instead, I'd skip the unnecessary GP2X toolchain and learn more about how things go together in the process.

I should be cool with SDL, I'm just wanting to get C::B and CS tied together first. I've just discovered this page:

http://wiki.codeblocks.org/index.php?title...ported_compiler

...I'll look into that further before I ask any more!
 
Last edited by a moderator:
Ok, I've done the sensible thing and gone back to the GP2X kit. I've compiled the SDL test successfully. Probably sounds silly but it feels like an achievement. :blush:

At some stage it would be great to have some detailed info on setting up CS, but I don't think I need to mess with that for now.

Any comments, or general pointing and laughing, are still welcome.
 
Gruso: You can setup different compilers in C::B so setting up codesorcery doesn't need to get rid of the gp2x stuff.

Goto compilers and debuggers and create a new compiler. and point C::B to codesorcery to the relevent toolchain EXEs.

they will be like
arm-linux-gcc.exe
arm-linux-g++.exe

etc.

Hope that helps a little at least.
 
Gruso said:
Ok, I've done the sensible thing and gone back to the GP2X kit. I've compiled the SDL test successfully. Probably sounds silly but it feels like an achievement. :blush:

At some stage it would be great to have some detailed info on setting up CS, but I don't think I need to mess with that for now.

Any comments, or general pointing and laughing, are still welcome.
also be aware SDL hasnt been released for Pandora, so you will be stuck (like i am) until it comes out. If you point to the GP2X SDL when you link you get a message about incompatible binary types
 
Last edited by a moderator:
Thanks for the advice guys. I'll stick with what I've got for now, but I do have one question for future reference, related to the screen shot above. I was able to find the obvious CS equivalents (in \bin) for the first five entries, but not the last two (Resource compiler: windres.exe, and Make program: mingw32-make.exe). What goes in here?
 
Gruso said:
Thanks for the advice guys. I'll stick with what I've got for now, but I do have one question for future reference, related to the screen shot above. I was able to find the obvious CS equivalents (in \bin) for the first five entries, but not the last two (Resource compiler: windres.exe, and Make program: mingw32-make.exe). What goes in here?

s
the res one isnt used, the make just copy whatever the gp2x complier has for the pandora
 
Last edited by a moderator:
Back
Top