Help! I Can't Even Get Started!


sabrecheeky

Member
Joined
Nov 16, 2005
Messages
115
I am brand new to the gp2x - a great little machine. One main reason for getting it was the tantalising comment on gbax.com - "not since the amiga has a system been so easy to develop for" - which is good for me as the Amiga was the last system I developed for. And I quite liked the idea of brushing off the old coding cobwebs.

I come from a time before tool chains and all that madness. You had an editor, and a compiler. You typed your code - you compiled your code (you watched your machine crash spectacularly) - job done.

Life has moved on... Surely nowadays it should be even easier... Ha! So here is my tale of woe...

I followed Guyfawkes excellent GP2X guide to set up a development environment on my XP machine. Not too shabby - everything working. Tried his 'sdltest' download - compiled it, transferred it, ran it - no problems. Piece of piss I thought, but what was this thing called a 'makefile'? I'm sure it's not important.

Wrote a little code and thought I'll try to 'make' it - oh the naivety! Apparently 'make' is a UNIX thing that needs a specific 'makefile'. I wouldn't know a UNIX thing if it punched me in the face. It's bad enough getting used to a new machine without having to learn about UNIX. I had a look at said 'makefile' - UNIX text file on notepad - never a good sight. Bugger that I thought.

What I needed was an Integrated Development Environment (I believe I had one of these on my ZX81) so I unzipped the SDK which had been sitting on my Harddrive for months (I've only had my GP2X a fortnight). Nice little environment, seems quite friendly - a nice little menu item which says 'compile' - lets give that a shot. Created a project with Guyfawkes sdltest - lets go...

"Couldn't reserve 3600336 bytes of space for cygwin's heap, Win32 error 487"

What? WTF is this? WTF is cygwin? Did I only have maybe 3600335 bytes? Oh well - back to google. So cygwin is a UNIX like environment. And why do I need this? After hunting round here I find the problem to be 'cygwin-mkdir.exe' which does what? It uses a UNIX environment to make a directory in windows. Now I've used windows before; I'm pretty sure there is a command to make a directory in windows msdos command line.

So I install 'cygwin'. No idea why. Try again. Same error. This topic http://www.gp32x.de/board/index.php?showtopic=29372 mentions making a msdos batch file to circumvent this problem. This succeeded in giving me a different error code. This is upsetting as I now know there are at least 487 different errors.

Anyway running 'cygwin-mkdir.exe' on command line gives the error "can't find cygintl-3.dll". I went to C:\cygwin\bin and found "cygintl-3.dll" right away. How do you tell a PC that it didn't look bloody hard enough?

So which option should I go for...

A. Can anyone tell me an easy way in windows to create generic makefiles which I can use with Guyfalkes set up without learning yet another bloody language? OR...

B. Can anyone tell me how to sort out this problem with DevC++ calling cygwin error (as an amateur I think I'd probably prefer this)? A search has shown quite a few people have had this problem, but I cant seem to find a solution. OR...

C. Can someone tell me just to give up, its too complicated, and go back to messing with my Amiga A1200?

Thank you in advance!
 
Last edited by a moderator:
Thanks! Never thought of that.

Anyway added to path, getting the same error as before in DevC++, but now getting exactly the same error if I run 'cygwin-mkdir.exe' in command line!

But this is progress...
 
hehe :p
Strange that it says it cant find the dll whilst you have added the dir to the path...

maybe there are some other dirs you forgot to add to your path too?
 
Sorry - I wasn't clear.

Instead of it saying 'cant find dll' it now gives me the same error as I get when I try to compile in DevC++, i.e.

"Couldn't reserve 3600336 bytes of space for cygwin's heap, Win32 error 487"

So DevC++ could find the .dll, and was always able to. It was just when I tried to test the command myself in dos prompt that there was a problem.
 
No, I'm afraid not.

I've found a few other threads that mention the same thing both here, e.g.

http://www.gp32x.de/board/index.php?showtopic=30125

and on other sites, but none of these threads seems to end in an answer to the problem. Some people have spoken about having different versions of cygwin1.dll's on your machine causing difficulties. This might be my problem - my poor little machine is so in need of a clean up. I think I'll ask that stupid little search dog to see how many of these I have. I may be some time...!

Do you think the official SDK is worth persevering with? I understand that experienced coders, like guyfawkes, would prefer to develop in an environment they are familiar with from other machines. This is probably what he describes in his guide, but I just want an easy life.

Thanks again for your help!
 
Last edited by a moderator:
I would absolutely recommend using the official SDK until you get comfortable with the system and need the extra umph that the other SDKs give you. With the official SDK it's like you said... You've got a editor... you push a button. It compiles. You can compile for windows and gp2x but just switching a little pulldown. I started on it and the game in my sig was created with it. I've switched to a new toolchain and sure things run faster, but it's a lot more of a pain in the ass to use until you get it all set up to your liking.
 
Thanks everyone for their replies!

@dockthepod
Yes this was my hope, but there is obviously a problem with cygwin on my machine, which the official SDK uses. I found another app on my machine which uses said cygwin1.dll - PSPVideo9, so I uninstalled it. I also tried to uninstall cygwin itself, not quite so sure if I've pulled that off. I then installed the official SDK from the CD that came with my machine (timestamped Dec 06), messed with the config so I could read it and fix the paths (all D:\ for some reason) - compiled and... BAM same sodding error.

@craigx
I tried this using guyfawkes test, but unless I had one c++ file called sdltest.cpp, and one header file called sdltest.h it wasn't playing. PS do you still run gbax.com? If so thanks for the speedy delivery of my GP2X - under 20 hours - a record I'd imagine.

@yaustar
Thanks for the pointers into the GP2X wiki - It is such a vast source of information it is hard for an amateur like myself to know where to start. I'll give devC++ a go as described there, as it seems to use minGW rather than cygwin. The 'all in one' is the download I am having trouble with.

I wish I knew what the hell I was doing...!
 
also note that cygwin is not always happy if it is not rooted on your C drive. I package and install cygwin on multiple PC every month and it can be cranky.
 
Hallelujah! :lol:

Got guyfawkes test to compile straight from source!

Just for the record...

1. Binned Official SDK. cygwin + my machine = arse.

2. Set up devc++ as per yaustar and http://wiki.gp2x.org/wiki/Using_Devcpp

3. Tried guyfawkes test - pages of errors! Linkers mentioned on http://wiki.gp2x.org/wiki/Using_Devcpp don't include all linkers required. Should say "-lSDLmain -lSDL -static -lSDL_mixer -lSDL_ttf -lSDL_image -lsmpeg -lmikmod -lvorbisidec -lfreetype -ljpeg -lpng12 -lz -lm -lSDL -lpthread -lmad -lSDL_gfx" in Linker option - thanks to Arch Deviant on http://www.gp32x.de/board/index.php?showtopic=34420

4. Tried on GP2X - working

5. Rejoiced. :D

Thanks again to everyone who helped me get my set up going here.
Now the real fun/pain begins...!
 
Last edited by a moderator:
Back
Top