GP2X Sdl On F200


QUOTE

CODE


#include <stdio.h>

int main(int argc,char **argv)
{
fprintf(stderr,"Program entry\n");
return 0;
}





You get the problem with this code?

Even if main.gpe didn't exist, you'd expect to get

./main.gpe : No such file or directory

in error.txt

In your script, the last line should be

CODE

exec ./gp2xmenu



(what idiot gave you that script :))

That's probably why the menu isn't coming back - doesn't explain why there's no text in error.txt though.
 
Parkydr said:
QUOTE

CODE
#include <stdio.h>

int main(int argc,char **argv)
{
fprintf(stderr,"Program entry\n");
return 0;
}





You get the problem with this code?

Even if main.gpe didn't exist, you'd expect to get

./main.gpe : No such file or directory

in error.txt

In your script, the last line should be

CODE

exec ./gp2xmenu



(what idiot gave you that script :))

That's probably why the menu isn't coming back - doesn't explain why there's no text in error.txt though.

lol, well i shall adjust the script. i think maybe its something i'm doing with either my make file or similar, maybe the ver. of gcc i'm using?
 
Last edited by a moderator:
Sphinxter said:
All right, let's see the make file.
will post make file tonight, i adjusted the run script to use ./gp2xmenu and it runs.
i've compiled just
CODE

#include <stdio.h>

int main(int argc,char **argv)
{
fprintf(stderr,"Program entry\n");
return 0;
}


and its printing to error.txt

its only if i just the SDL stuff in it's crapping out, but then so do the demo apps that come with SDL sdk. although other apps run ok. maybe it is something in the makefile
 
Last edited by a moderator:
my makefile, this was just a edit of and existing demo one:
CODE



CROSS_COMPILE = C:/devkitGP2X/bin/arm-linux-
SDL_BASE = C:/devkitGP2X/bin/arm-linux-
LDFLAGS = -static

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip

CFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall -Werror
CXXFLAGS = `$(SDL_BASE)sdl-config --cflags` -O2 -Wall -Werror
LIBS = `$(SDL_BASE)sdl-config --libs`

SDLTEST_TARGET = main.gpe
SDLTEST_OBJS = main.o

all : $(SDLTEST_TARGET)

$(SDLTEST_TARGET) : $(SDLTEST_OBJS)
$(CXX) $(LDFLAGS) -o $(SDLTEST_TARGET) $(SDLTEST_OBJS) $(LIBS)
$(STRIP) $(SDLTEST_TARGET)

clean:
rm -f $(ALL_TARGETS) *.o *~



whole project:

here
 
spot the mistake

SDL_Surface* screen = SDL_SetVideoMode(320, 240, 321, SDL_SWSURFACE);

if(!screen)
{
fprintf(stderr,"Screen not ready");
return 0;
}
 
Back
Top