Re: [Plib-users] PLIB (pui) + SDL?
Brought to you by:
sjbaker
From: Slowhand_47 <slo...@gm...> - 2004-12-23 09:45:47
|
Am Wed, 22 Dec 2004 23:34:05 +0100 schrieb Alberto BARSELLA <is...@fr...>: > (MapUI.o is my object file, the source, MapUI.cpp only contains an > #include <plib/pu.h> and a call to puInit(), for now). > I could not find anything similar by searching with google, but a lot of > places seem to indicate that plib should work find with SDL... what am I > doing wrong? Does your file contain "#include <SDL.h>" *before* you include pu.h? Have you set the #define PU_USING_SDL? I'm currently integrating PUI into an SDL application, so I can assure you it works. I had some trouble compiling the SDL-example from the PLIB-CVS (only showed a black screen), but in my application it works fine. In your MapUI.cpp you should have lines like this: #include <SDL.h> #include <plib/pu.h> SDL.h must be included before pu.h! Then, make sure that your CFLAGS and LFLAGS contain all necessary stuff for SDL (sdl-config --cflags and sdl-config --libs). Add a compiler switch which defines the above mentioned macro. For gcc this would be: -DPU_USING_SDL Last, make sure to link plibpu, plibul and plibfnt to your application. Kind regards, Jan -- Jan Reucker email: jan dot reucker at web dot de web: http://www.reucker-online.de |