Freera


namco

Member
Joined
Mar 22, 2006
Messages
410
Age
41
Location
Manchester, UK
Website
www.stupendous-stuff.com
I've already mentioned this in the general forums, but I'm now wondering if anyone could help me out.

What could be the probable cause of a program that compiles, without errors, in the gp2x format and when put on the gp2x you just get a blank/black screen (other than a corrupted *.mix file)?

I'm using Dev-cpp and devkitGP2X.

Do you need more info on this? if so what do you need?
 
Could be any number of things... sounds like a segfault to me though...
Maybe try and use serial or dump the output to a log file to see what's happening...
 
ok I telnetted in and found that it can't find a library, so I included the path where the library was located and rebuilt it.

I now have 4 errors which is to do with a header file that seems to be part of devkitGP2X. Here's the error:

parameter '_imp___argv_dll' includes pointer to an array of unknown bound 'char* const()'

These are errors in the unistd.h.
 
namco posted on Mar 5 2007 at 08:15 PM said:
ok I telnetted in and found that it can't find a library, so I included the path where the library was located and rebuilt it.

If the library isn't found you need to set the LD_LIBARY_PATH environment variable to include the library path or easier statically link your executable
 
Last edited by a moderator:
i'm assuming that putting -static after -lSDL and -lSDLmain statically link my libraries?

which part in dev-cpp do i set LD_LIBARY_PATH?

I'm just not getting this am I? - Sorry

I'd do this with a makefile but the last time I tried I ended up with no hair, so to speak!!
 
namco posted on Mar 5 2007 at 02:28 PM said:
I've already mentioned this in the general forums, but I'm now wondering if anyone could help me out.

What could be the probable cause of a program that compiles, without errors, in the gp2x format and when put on the gp2x you just get a blank/black screen (other than a corrupted *.mix file)?

I'm using Dev-cpp and devkitGP2X.

Do you need more info on this? if so what do you need?

Any well written program that paints the screen black and goes into an infinite loop.
 
Last edited by a moderator:
namco posted on Mar 6 2007 at 03:54 PM said:
i'm assuming that putting -static after -lSDL and -lSDLmain statically link my libraries?

which part in dev-cpp do i set LD_LIBARY_PATH?

I'm just not getting this am I? - Sorry

I'd do this with a makefile but the last time I tried I ended up with no hair, so to speak!!

Yes, you are not getting it :)

I think -static can go anywhere in the link so what you've done should be ok.

If you statically lib the libraries will be built into the executable so it should just run, you won't need LD_LIBRARY_PATH. So I would do this.

If you use dynamic linking LD_LIBRARY_PATH is an environment variable which is used when you run your program.

You would generally set up in the start script on the GP2X e.g.

export LD_LIBRARY_PATH=/mnt/sd/libs:$LD_LIBRARY_PATH
./myApp


Summary: use -static and you'll be ok
 
Last edited by a moderator:
Back
Top