Devkit On Linux - How To Use It


parisgraphics

Still Fresh
Joined
Dec 26, 2006
Messages
6
Website
www.parisgraphics.com
hi list,

i've done some simple programs cross-compiled with the sdk from gamepark dev-c++ on windows.
i want to do the same on linux so... i read this:
http://wiki.gp2x.org/wiki/Setting_up_a_dev...x%29#devkitGP2X
and have run the script to set up devkitGP2K.
there were a few problems but finally in ran successfully.

ok... now what?
are there some docs somewhere that i missed?
how do you actually use this to cross compile?

thanks!
p
 
You compile via commandline using a makefile. Or you can setup an IDE to use DevKitGP2X as a compiler.
 
yaustar said:
You compile via commandline using a makefile. Or you can setup an IDE to use DevKitGP2X as a compiler.
Thanks - that's what I thought but haven't figured out how exactly.

devkitGP2X is installed in it's own directory, so i know that i need to use that gcc instead of /usr/bin/gcc
(i guess just setting my PATH) but also wonder what arguments i send to arm-linux.

i'll try searching the devkit archives but if there's any sites that you know that give sort of a walk through or sample makefile or something, it would be appreciated.

Best,
p
 
Last edited by a moderator:
Get the Guyfawkes SDL Test sample from the archive. Inside is a 'standard' makefile. There were also a few threads regarding compiling on this board which has some sample makefiles inside.

As long as you understand the basic process of building an executable from source (what the compiler does, linker, libraries), the makefiles are fairly simple to decipher and understand.
 
yaustar said:
Get the Guyfawkes SDL Test sample from the archive. Inside is a 'standard' makefile. There were also a few threads regarding compiling on this board which has some sample makefiles inside.

As long as you understand the basic process of building an executable from source (what the compiler does, linker, libraries), the makefiles are fairly simple to decipher and understand.

Excellent - just what I was looking for.
I'm fine with compiling from source, etc. but haven't done much cross-compiling outside of using gamepark's sdk which already came with a template set up in dev-c++

Thanks!
 
Last edited by a moderator:
I, for example, use something to the effect of:

CODE
/usr/local/devkitPro/devkitGP2X/bin/arm-linux-g++ *.cpp lib/*.c lib/*.cpp -o output.gpe -Wall -Iinclude -static -D GP2X -I/usr/local/devkitPro/devkitGP2X/include `/usr/local/devkitPro/devkitGP2X/bin/arm-linux-sdl-config --libs` -lSDL -lSDL_image -lSDL_ttf


Of course, it's in a makefile, with all the variables and such, but hopefully that gives you the idea. For me, it was trial and error to get to this point.
 
Avik said:
I, for example, use something to the effect of:

CODE
/usr/local/devkitPro/devkitGP2X/bin/arm-linux-g++ *.cpp lib/*.c lib/*.cpp -o output.gpe -Wall -Iinclude -static -D GP2X -I/usr/local/devkitPro/devkitGP2X/include `/usr/local/devkitPro/devkitGP2X/bin/arm-linux-sdl-config --libs` -lSDL -lSDL_image -lSDL_ttf
Of course, it's in a makefile, with all the variables and such, but hopefully that gives you the idea. For me, it was trial and error to get to this point.


Hey Avik,

Awesome - thanks for sharing!
I'll have to look up what some of these options are but I get the general idea :)

Best,
p
 
Last edited by a moderator:
Back
Top