| View previous topic :: View next topic |
| Author |
Message |
Leo28C
Joined: 18 Jan 2007 Posts: 19
|
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Fri Mar 21, 2008 1:51 pm Post subject: Re: SDL on Slim? |
|
|
YOu have to unlink sdlmain from your cflags, i found it easier to edit sdl-config and make two new lines for libs / cflags and remove the SDL_Main bit and replace it with --nomain |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Fri Mar 21, 2008 2:09 pm Post subject: |
|
|
| Code: | SDL_FLAGS = $(shell $(PSPBIN)/sdl-config --cflags)
CFLAGS += $(shell echo $(SDL_FLAGS) | sed -re s/-Dmain=\\S+//) #Remove main redefinition
SDL_LIBS = $(shell $(PSPBIN)/sdl-config --libs)
LIBS += $(shell echo $(SDL_LIBS) | sed -e s/-lSDLmain//) #Remove SDLmain from libs |
Have that in your makefile instead of
| Code: | | CFLAGS += $(shell $(PSPBIN)/sdl-config --libs --cflags) |
(This won't work if you're not using a Unix-like environment for compilation, e.g. a native Windows toolchain without GnuWin32 installed)
You'll also need your own version of some of the stuff that SDLmain provides, e.g. PSP_MODULE_INFO and setting up the home callback. |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Fri Mar 21, 2008 3:35 pm Post subject: |
|
|
| Ignore me... |
|
| Back to top |
|
 |
Leo28C
Joined: 18 Jan 2007 Posts: 19
|
Posted: Sat Mar 22, 2008 1:24 am Post subject: |
|
|
| Wee, thanks! That did the trick. =) |
|
| Back to top |
|
 |
|