![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on SDL error! within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I just installed SDL (no problem) but when I compile something I get /usr/local/pspdev/lib/gcc/psp/4.0.2../../../psp/lib/crt0.o in function '_main' /home/p.../pspsdk/src/startup/cr-.c:86: undefined reference ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
I just installed SDL (no problem) but when I compile something I get
/usr/local/pspdev/lib/gcc/psp/4.0.2../../../psp/lib/crt0.o in function '_main' /home/p.../pspsdk/src/startup/cr-.c:86: undefined reference to "main" my makefile looks like this: TARGET = hello OBJS = Main.o CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = SDL GL PSPSDK=$(shell psp-config --pspsdk-path) PSPBIN = $(PSPSDK)/../bin CFLAGS += `$(PSPBIN)/sdl-config --cflags` -DHAVE_OPENGL LIBS += -lglut -lGLU -lGL `$(PSPBIN)/sdl-config --libs` -lm -lc -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpspvfpu -lpspuser -lpspkernel -lstdc++ include $(PSPSDK)/lib/build.mak thanks in advance!! |
|
|
|
|
|
#2 |
|
I'm also fairly new to SDL. Actually I dropped it because I couldn't get the frames per second up to something decent, but I did get it to compile.
SDL defines it's own main() function. This function defines all the PSP specific callback and does some other init stuff and then calls a function called SDL_main(). SDL_main is the function that you should write as the "starting point" of your code. You should declare it something like Code:
extern "C" int SDL_main( int argc, char *argv[] ); |
|
|
|
|
![]() |
| Tags |
| error , sdl |
| Thread Tools | |
|
|