I Need Info For Compile With Sdk And Others Info


renejr902

Active Member
Joined
Apr 19, 2008
Messages
767
Age
44
Location
CANADA, Montreal
Website
Visit site
i start reading my C++ book, i had previous experience with turbo pascal and made some app in the past.

RIGHT now i just made a few C++ app, and i want to try to compile it with the Caanoo SDK.

But i dont really know how its work.

and using my C++ book, i modified a few codes from oh boy (emulator) caanoo source and i want to compile oh boy with the caanoo SDK.
but i really dont know how to do it.

i used Visual C++ express. i read that is not a good idea to compile for the caanoo with that

what app i need to compile my app and oh boy source.

i read a lot of things, still im confuse.

and im not sure to understand what the librairies are exactly.

i have a few .cpp files to compiles. and Oh boy source has a lot of files . i dont know which ones i need to compile it.


right now:

i use windows xp
i have visual C++ express installed.
i have GPH SDK for caanoo installed.
i have Dev-C++ installed working and configurated with the wiz sdk , ready to create project
i have installed codeblocks-10.05mingw-setup.exe

Thanks for help.

i would appreciate help. even if it seem hard to explain i will try to understand. THANKS
note: i read a lot of topic in the developer section. BUT WHAT I WANT REALLY IS COMPILE SOURCE WITH SDK AND TRY IT IN MY CAANOO. THANKS

edit: i read SDK 10.08 Guide

and the developer guide

still not sure about a lot of things

i try to configure the sdk directory in compiler setting. after that i start a new project, i choose the gp2x project. and i got a main.cpp. still dont know what to do with my own .cpp file

so i try to compile the 2dtutorial that is include with the SDK. and when i build it i got several errors. nothing is built.

But i can compile the examples Wiz games proeject source codes in .gpe files. its work.


its not easy... Thanks for help.

edit2:

i install this sdk with dev-c++ already configured:

This SDK comes from http://www.gpain.com/bbs4/view.php?id=dev&no=83

This is Dev-C++ from the GPH's GP2X SDK with the Wiz toolchain.


i created a new project app for gp2x wiz. a main.c file appear in the project. i just tried to run and build it and it work i got a black screen with the word SDL.

still dont know where to put my .cpp app i made.

and i dont know how to compile a source code from a gp2x wiz emulator too. each emulator source has a lot of files.

BUT i suceed to compile the wiz games example in .gpe format. i compiled the shooter game shooter.gpe
so i have to understand the real meaning of the .h file, and whats the difference between main.c and easywiz.c
my cpp files are only 1 file by app. i dont have several files for 1 app.
its not easy... Thanks for help.

EDIT: after a lot of reading i begin to understand the difference.
 
i see nobody has help me. BUT i understand that is difficult to help someone that is so confuse. LOL

i began to read my C++ book and a lot of information about SDL, i read some source code about pong game and wiz|caanoo source emulator code.

i read more than 20 hours since yesterday.

before today i didnt understand how MUCH work is it to port a emulator or make a emulator or make a homebrew game.

what i did in the past with turbo pascal, is nothing compared to make a real game or emulator and port it to the Caanoo or any other handheld.


Anyway if you can tell me how to compile a source code from a wiz or caanoo emulator. i just want to practice to compile a source code to the .gpe file

my DEV-CPP setup for the wiz is already working. i can create a project for a gp2x wiz . i got the main.c file with a lot of information. and when i compile i got the .gpe file. im able to compile the example games project in .gpe

but i dont know how to import a source code with DEV-CPP and compile it to get the .gpe file.

if its possible to explain me that . thanks. otherwise i will understand that is too soon to try this.

thanks

note: is there a way to explain me how to port a sdl game to wiz or caanoo. your welcome. but i dont think im ready to do that.
 
great i suceed to compile Wiz TONG homebrew with a few modification.

IT WORK !!!

i changed some speed effect.
i changed some titles names.

note: only a few source compile correctly. i must doing something wrong with others games


Where i can find the caanoo ohboy Source ?? i dont find it anywhere
and the CPS2 emu source for wiz and caanoo

thanks

edit: i made some change to oh boy for caanoo and change the buttons configuration, but im unable to compile with the caanoo sdk. i think its configurated correclty. thanks for help

My Wiz sdk is configurated with DEV-CC+ and works great.
But my Caanoo sdk is configurated with Codeblocks, and i cant compile anything with gp2x caanoo project. it said nothing to compile everytime.

OR if someone want to compile it for me i uploaded the file
THANKS

http://www.megaupload.com/?d=7JN8IJ6I

note: i will reinstall codeblocks with caanoo sdk in a few days. i hope to get it working this time.
 
2 new Tong4Wiz edition i made myself. ITS FOR THE WIZ. I try to compile it for the CAANOO.!!! BUT I CANT SUCESSS, i need help :)

the form of blocks has been completely changed

TONG-blocks-mod.gpe = the form of blocks has been completely changed (very hard) + Ball removed

TONG-noball.gpe = the ball has been removed. so it become a standard Tetris

Have fun !!

its my first coding experience.
so i want to mod a homebrew already existing for first experience.

i wait your comment.

Thanks

http://www.megaupload.com/?d=OK2SEKMH

caanoo version soon, when i can get my caanoo sdk working
 
You should look up the use of "makefile"(s), most software for caanoo and wiz etc use those instead of calling the compiler directly (like with code blocks). If the software your trying to "mod" doesn't come with project files for code blocks or any other IDE you use, it will almost certainly have a makefile, in most case you just have to type "make" in the directory where the makefile is located and it will compile.

I would highly suggest to use a linux version, to do your dev work most tools you were using exist under linux... You don't have to install linux on your pc itselve but you can use VM-WARE PLAYER or something similar (like sun virtual box), and install ubuntu OR download a vm-ware image directly so you have *linux access* from within windows... It'll help a lot and you get to play with ubuntu (a new operation system) from within windows as well. Do note it'll be slower then installing ubuntu on a real pc but at least you have everything then.

the installation of the caanoo SDK is not hard at all on linux, and it is documented somewhere... As far as i know there is now official caanoo windows SDK yet but there are unofficial ones ... and i think the wiz sdk could be used as well although not certain.. I just downloaded the caanoo sdk and installed that on my ubuntu..
 
joyrider said:
You should look up the use of "makefile"(s), most software for caanoo and wiz etc use those instead of calling the compiler directly (like with code blocks). If the software your trying to "mod" doesn't come with project files for code blocks or any other IDE you use, it will almost certainly have a makefile, in most case you just have to type "make" in the directory where the makefile is located and it will compile.

I would highly suggest to use a linux version, to do your dev work most tools you were using exist under linux... You don't have to install linux on your pc itselve but you can use VM-WARE PLAYER or something similar (like sun virtual box), and install ubuntu OR download a vm-ware image directly so you have *linux access* from within windows... It'll help a lot and you get to play with ubuntu (a new operation system) from within windows as well. Do note it'll be slower then installing ubuntu on a real pc but at least you have everything then.

the installation of the caanoo SDK is not hard at all on linux, and it is documented somewhere... As far as i know there is now official caanoo windows SDK yet but there are unofficial ones ... and i think the wiz sdk could be used as well although not certain.. I just downloaded the caanoo sdk and installed that on my ubuntu..

Great thanks for info

im installinG Cygwin with gcc-g++ package for compile makefile. is it ok for now ? i will install linux soon.
 
Last edited by a moderator:
renejr902 said:
im installinG Cygwin with gcc-g++ package for compile makefile. is it ok for now ? i will install linux soon.

nope not ok, unless you are going to crosscompile for arm, the cygwin with gcc / g++ package is for x86 (architecture), caanoo and wiz uses arm architecture so no that isn't going to work unless you can download an (un)official caanoo / wiz sdk that someone already crosscompiled (for arm usage) for you... Even if you managed to succeed to build a crosscompiler (which is a daunting task), you'd still need to compile all libraries like SDL,SDL_NET, SDL_MIXER, jpeg ,png,ogg etc.... which is even more time consuming and daunting depending on the lib... Your just better of getting the linux sdk where everything is done for you already

The whole point on having a linux image (inside vmware player or not) is not to use cygwin / mingw since that *might* give you more problems, problems you normally wouldn't get under linux ...

Just install vmware player it's FREE and so are the ubuntu image you can easily find, nothing you have to configure yourselve, i would not recomend you to install linux on your current pc unless you know what your doing and don't want to run the risk to loose your windows installation and all your precious data with it :) (that's why i suggested vmware / virtualbox)...

all info about that is availible on the internet as well :)

edit:
have you even bothered to look on the archive ??? there seems to be a precompiled windows toolchain availible for caanoo if you really need to use windows, have a look here : http://dl.openhandhelds.org/cgi-bin/caanoo.cgi?0,0,0,0,15,478

i don't use it and i guess most other people don't either, they just use a linux variant, which seems more logical imo since the caanoo itself runs on a linux kernel ...
 
Last edited by a moderator:
renejr902 said:
thanks again, im installing vmware and ubuntu-10.10-desktop-i386.iso

i installed Ubuntu and VMware player

i installed codeblocks
i installed apt-get install g++
i installed libgl1-mesa-glx
i installed yum
i installed the caanoo sdk for linux

after that i went to command prompt.
go to the ohboy directory
the source is there with the makefile
i renamed makefile.caanoo to makefile

and did MAKE

see the result:

renejr902@ubuntu:~/ohboy$ make
/home/fishybawb/Downloads/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/bin/arm-gph-linux-gnueabi-gcc -O3 -mcpu=arm926ej-s -mtune=arm926ej-s -I/home/fishybawb/Downloads/GPH_SDK/include -I/home/fishybawb/Downloads/GPH_SDK/DGE/include -I/home/fishybawb/Downloads/GPH_SDK/include/freetype2/freetype -I/home/fishybawb/Downloads/GPH_SDK/include/freetype2 -I/home/fishybawb/Downloads/GPH_SDK/DGE/include/SDL -I./gnuboy-1.0.3 -I/home/fishybawb/Downloads/GPH_SDK/include/freetype2 -DIS_LITTLE_ENDIAN -DGP2X -DCAANOO -D__NO_STRING_INLINES -c gnuboy-1.0.3/lcd.c -o gnuboy-1.0.3/lcd.o
make: /home/fishybawb/Downloads/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/bin/arm-gph-linux-gnueabi-gcc: Command not found
make: *** [gnuboy-1.0.3/lcd.o] Error 127
renejr902@ubuntu:~/ohboy$

thanks for help
 
Last edited by a moderator:
ok i changed the makefile path.

but it still dont compile !!


renejr902@ubuntu:~$ cd ohboy
renejr902@ubuntu:~/ohboy$ make
/home/renejr902/GPH_SDK/tools/gcc-4.2.4-glibc-2.7-eabi/bin/arm-gph-linux-gnueabi-gcc -O3 -mcpu=arm926ej-s -mtune=arm926ej-s -I/home/renejr902/GPH_SDK/include -I/home/renejr902/GPH_SDK/DGE/include -I/home/renejr902/GPH_SDK/include/freetype2/freetype -I/home/renejr902/GPH_SDK/include/freetype2 -I/home/renejr902/GPH_SDK/DGE/include/SDL -I./gnuboy-1.0.3 -I/home/renejr902/GPH_SDK/include/freetype2 -DIS_LITTLE_ENDIAN -DGP2X -DCAANOO -D__NO_STRING_INLINES -c gui_sdl.c -o gui_sdl.o
gui_sdl.c:2:21: error: SDL/sdl.h: No such file or directory
gui_sdl.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gui_sdl.c: In function 'gui_maprgb':
gui_sdl.c:21: error: 'screen' undeclared (first use in this function)
gui_sdl.c:21: error: (Each undeclared identifier is reported only once
gui_sdl.c:21: error: for each function it appears in.)
gui_sdl.c: In function 'gui_pollevent':
gui_sdl.c:25: error: 'SDL_Event' undeclared (first use in this function)
gui_sdl.c:25: error: expected ';' before 'event'
gui_sdl.c:53: error: 'event' undeclared (first use in this function)
gui_sdl.c:57: error: 'SDL_KEYDOWN' undeclared (first use in this function)
gui_sdl.c:57: error: 'SDL_KEYUP' undeclared (first use in this function)
gui_sdl.c:58: error: 'SDL_PRESSED' undeclared (first use in this function)
gui_sdl.c:60: error: 'SDLK_RETURN' undeclared (first use in this function)
gui_sdl.c:63: error: 'SDLK_ESCAPE' undeclared (first use in this function)
gui_sdl.c:66: error: 'SDLK_UP' undeclared (first use in this function)
gui_sdl.c:69: error: 'SDLK_DOWN' undeclared (first use in this function)
gui_sdl.c:72: error: 'SDLK_LEFT' undeclared (first use in this function)
gui_sdl.c:75: error: 'SDLK_RIGHT' undeclared (first use in this function)
gui_sdl.c:113: error: 'SDL_JOYBUTTONUP' undeclared (first use in this function)
gui_sdl.c:113: error: 'SDL_JOYBUTTONDOWN' undeclared (first use in this function)
gui_sdl.c: In function 'darken':
gui_sdl.c:147: error: 'SDL_PixelFormat' undeclared (first use in this function)
gui_sdl.c:147: error: expected ';' before 'format'
gui_sdl.c:148: error: 'format' undeclared (first use in this function)
gui_sdl.c: In function 'osd_darken':
gui_sdl.c:156: error: 'SDL_PixelFormat' undeclared (first use in this function)
gui_sdl.c:156: error: expected ';' before 'format'
gui_sdl.c:157: error: 'format' undeclared (first use in this function)
gui_sdl.c: In function 'gui_drawpixmap':
gui_sdl.c:168: error: 'SDL_PixelFormat' undeclared (first use in this function)
gui_sdl.c:168: error: expected ';' before 'format'
gui_sdl.c:175: error: 'format' undeclared (first use in this function)
gui_sdl.c:175: error: 'screen' undeclared (first use in this function)
gui_sdl.c:192: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:192: error: expected expression before ')' token
gui_sdl.c:211: error: expected expression before ')' token
gui_sdl.c: In function 'osd_drawpixmap':
gui_sdl.c:221: error: 'SDL_PixelFormat' undeclared (first use in this function)
gui_sdl.c:221: error: expected ';' before 'format'
gui_sdl.c:224: error: 'screen' undeclared (first use in this function)
gui_sdl.c:228: error: 'format' undeclared (first use in this function)
gui_sdl.c:245: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:245: error: expected expression before ')' token
gui_sdl.c:259: error: expected expression before ')' token
gui_sdl.c: In function 'gui_begin':
gui_sdl.c:265: error: 'screen' undeclared (first use in this function)
gui_sdl.c:267: warning: incompatible implicit declaration of built-in function 'malloc'
gui_sdl.c: In function 'gui_update':
gui_sdl.c:276: error: 'screen' undeclared (first use in this function)
gui_sdl.c: In function 'gui_end':
gui_sdl.c:283: error: 'screen' undeclared (first use in this function)
gui_sdl.c: In function 'osd_cls':
gui_sdl.c:293: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:293: error: expected expression before ')' token
gui_sdl.c:293: error: 'screen' undeclared (first use in this function)
gui_sdl.c:294: error: expected expression before ')' token
gui_sdl.c: In function 'gui_cls':
gui_sdl.c:304: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:304: error: expected expression before ')' token
gui_sdl.c:305: error: expected expression before ')' token
gui_sdl.c:305: error: 'screen' undeclared (first use in this function)
gui_sdl.c: In function 'gui_drawrect':
gui_sdl.c:329: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:329: error: expected expression before ')' token
gui_sdl.c:329: error: 'screen' undeclared (first use in this function)
gui_sdl.c: In function 'osd_drawrect':
gui_sdl.c:338: error: 'screen' undeclared (first use in this function)
gui_sdl.c:352: error: 'Uint16' undeclared (first use in this function)
gui_sdl.c:352: error: expected expression before ')' token
make: *** [gui_sdl.o] Error 1
renejr902@ubuntu:~/ohboy$

thanks for help.
 
Code:
gui_sdl.c:2:21: error: SDL/sdl.h: No such file or directory
The file is called "SDL/SDL.h", so the code is wrong (was probably only compiled in Windows before, where filenames are not case sensitive).
 
renejr902 said:
strange sdl.h is not present in the source !!

it's a library include file... do some research.. a library is basically a collection of fucntions, if you want to use them you have to include header files and link against the library (that's what the -l???? flags are about), you specify the location of those libs with -L????? it's normal the source doesn't have it, since it comes preinstalled with the SDK so you don't have to compile it yourselve... the point i made in private message and people above made is that the sources references this library but that linux uses a case sensitive filesystem (if you don't know what it means by now, google it) so you have to look for the references "#include" statements and check the case they are using, it's lowercase and the files on linux are most probably in uppercase fix that and your problem is solved :)

also if you bothered to look through the wall of text you'd have seen that there was a line saying "error blalablabla", those are the lines you need to look for when compiling with make files, and you can google those error's (without the source file and line numbers it would have given you the solutions most probably) these kind of things you have to learn to do i know it's easy to just ask on forums but you learn much more by erroring & trialing :) although you could also learn when people tell you your mistakes but i always believe if you can find the solution yourselve will most likely remember it longer ;)
 
Last edited by a moderator:
i got it !! its compiled. a file ohboy (without extension was created.)

i rename the file to ohboy.gpe

i try it with my caanoo !! :(

It doesnt load !!!!!!!!!!!!!!!!!!!

the only thing i have changed is buttons configuration. and im sure i did it right. im so dissapointed !!

:(

what could it be ?

THANKS A LOT FOR HELP. im learning a lot
 
i'm actually very closely watching this thread as I've never ported anything before and want to try my hand at porting some of the wiz emulators over to the caanoo
 
renejr902 said:
something is wrong.

even when i compiled the original oh boy source file. it doesnt load


ok first things first, stop sending me PM's it's starting to irritate me, this thread is fine enough and i'll answer when i feel like doing so or when i see a new post, no need to send a duplicate to me by pm's..


When something compiles / links, it doesn't mean that it will run, you had made no syntax errors (like in the language) but you could have made programming errors !!!

The thing you need to do now, is stop running the game / port / emualtor from the menu, and learn some linux commands. you'll need telnet access either through wifi or usbnet (both discussed already on this board).

so download the telnet ini file or make it yourselve run the deamon and login to it, get putty on windows or let your wifi work through vm ware player (or usbnet)....

anyway once you have telnet access login with "root" username. then press Ctrl-C so the 2nd instance of the menu will quit, next do a ps -aux look for the /usr/gp2xmenu entry and write down the PID (number at the start). then do a kill -kill pidnumer (where pidnumber is the number from the ps command you found). this will kill the menu (again that was running from boottime). it will seem as if your caanoo has crashed, but it actually hasn't, you can now start running apps from the prompt (through telnet).

all you need to know are these commands :
"cd directoryname" change to a dir with name directoryname
"ls ./" list all files in the current directory where you are
"./somebinary" run ./somebinary the ./ will tell linux you want to run the binary from the current directory.

the directory /mnt/sd is where your sd card files are :)

Do all of the above with oohboy and see what errors you are getting.... and then start tracing the BUG (you probably created) down...
if ooboy added it's own debug info you'll see it, you would also see if it segfaulted or not or something similar.

gdb (a debugger) is also an option but might be too advanced if you just started...

the trick i use, i place statements like this in the code where i changed bits :

Code:
unchanged code
unchanged code
unchanged code
printf ("i changed here 1\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 2\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 3\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 4\n");
unchanged code
unchanged code
unchanged code

the printf statements are what matter, so now recompile and run the executable (through telnet) again, and you'll see those text printed out while you are running the exectuable, that way you can trace down which line of code (given you don't use threads) is causing a crash and you'll have to look at the source code to see what happens there... (i'm not going to do that for you...)

easier then gdb if you don't know how it works :)

lot's of research to do again...

have fun ...
 
Last edited by a moderator:
thanks for info joyrider. i will try all of this soon, i take all of that in note.

IM not trying it now, BECAUSE it work, i found the error. there was a last path that was not correct.
it took me some time to find it. it was a librairy problem

i wont pm you anymore dont worry, im sorry about that. everybody is busy and tired with our life, job, family... and getting pm a lot is not fun.

sorry my english is not great, i hope you get my point. im sorry

WITHOUT YOU, i will never be able to compile anything for months. it was not easy.

Now, im ready to modify some code, a make a homebrew game. i want a sdk installation that work correclty.

THANKS AGAIN, youre really a nice guy. i was even surprised that you help so much, its exhausting

im really happy.

note:
unchanged code
unchanged code
unchanged code
printf ("i changed here 1\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 2\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 3\n");
changed code (you did this)
changed code (you did this)
printf ("i changed here 4\n");
unchanged code
unchanged code
unchanged code

your trick is a good idea. i will do this everytime now.


note2: THANKS TO hmn too !!
 
For your information...

im able to make some VERY basic changes to emulator like for oh boy.

i read some sdl information and half of my C++ book and i read a lot of source. But still i dont have enough knowledge to do more than basics changes.

i tried 3-4 hours to make a fullscreen oh boy and didnt suceed. the best i got is a fullscreen size gameboy game but inside the 160 x 144 resolution. So its not usable at all. its completly overscan.

i tried to learn some codes reading the snes9x4c source but its very difficult. i try to find the cpu speed mhz parameter, but i didnt find anything relate to that. i modify very basic things and compile and it work. after that i read the nes for caanoo source it was more easy but i cant compile this one.


i will try to make a homebrew first.
i REALLY want to port emulator but im not ready for that thats for sure. i compared some wiz source vs caanoo, but its not enough to code a port.
i need several months to figure all of this. i made some turbo pascal in the past but it was 10 years ago.
i did that if someone interested http://www.gp32x.de/board/index.php?/topic/56595-ohboy-caanoo-port/page__st__15
and this http://www.gp32x.de/board/index.php?/topic/57083-tong4wiz-2-new-edition-no-ball-edition-blocks-shape-changed/
 
Last edited by a moderator:
you obviously didn't understand my words when i said that you have to "first learn to keep your balance then learn to walk and then learn to run"
start small, and create little game's, start with obvious simple games like pong then tetris by the time you created those you can do some other things and know enough to do basic ports yourselve, making button changes in current emulators is crap since noone care's unless you make it configureabe and i don't think you can do that yet. Stop trying to do run when you can't even keep your balance yet. it's an analogie to a baby trying to learn to walk they do it with small steps as well so should you...
 
Back
Top