GP2X Compiling With Gp2xsdk


perishabl

Still Fresh
Joined
Apr 3, 2004
Messages
37
I downloaded GPH's GP2XSDK, unzipped it into a folder, and also downloaded a sample project that was linked either here or in GPH's dev forum. I'm able to compile individual files just fine, but when I try to compile the enter project, I get

Code:
Compiler: gp2x
Building Makefile: "G:\gp2xsdk\projects\hello_bmp\Makefile.gp2x
Executing make...
make.exe -f "G:\gp2xsdk\projects\hello_bmp\Makefile.gp2x all
cygwin-mkdir -p "gp2x"
	 3 [main] ? 1304 init_cheap: Couldn't reserve 3600336 bytes of space for cygwin's heap, Win32 error 487
G:\GP2XSDK\bin\cygwin-mkdir.exe (1304): *** AllocationBase 0x0, Base Address 0x61820000, RegionSize 0x360000, State 0x10000
make.exe: *** (all-before) Error - 1073741819
Execution terminated

I've tried several other projects, and get the same error with all of them.

Anybody run into this before and been able to sort it out?
 
I've tried several other projects, and get the same error with all of them.

Anybody run into this before and been able to sort it out?

G:\GP2XSDK\bin\cygwin-mkdir.exe -p "gp2x"

Try that command on its own and see if it behaves (i.e. if it creates a directory called gp2x). Check that you have write access to the drive(s) and that you have space left (I'm guessing). Checkdisk the drive.
 
Last edited by a moderator:
G:\GP2XSDK\bin\cygwin-mkdir.exe -p "gp2x"

Try that command on its own and see if it behaves (i.e. if it creates a directory called gp2x). Check that you have write access to the drive(s) and that you have space left (I'm guessing). Checkdisk the drive.

I don't think it's disk related -- I get the same error if I run cygwin-mkdir.exe from the commandline without any parameters at all.
 
Last edited by a moderator:
This might be a bit late, but I had this exact same problem on my father's PC and I manager to resolve it, sort of. I don't actually know how to fix the problem, but you can work around it.

First of all, the problem lies solely with cygwin-mkdir.exe, the executable that is used to create the build directories before actually compiling your code. A normal call to Windows's 'mkdir' command would be a lot easier and less error-prone, so that's what we're going to do.

Go to your \GP2XSDK\bin directory and rename cygwin-mkdir.exe to cygwin-mkdir.exe.bak or something like that. Next, create a new text file in the same directory and rename it to cygwin-mkdir.bat. Open up this file and type in the following:

Code:
@echo off
if not exist %2 mkdir %2

Save and close, and now your projects should compile just fine.

Another, perhaps more elegant way would be to manually create your makefiles, avoiding the use of cygwin-mkdir, and delivering those to Dev-C++. But of course, that's not as convenient as letting Dev-C++ automatically generate your makefiles.
 
ey! Devil N very very thanks! i don´t understand why this fix that, but it runs ;)
 
Back
Top