|
From: Serge v. d. B. <sv...@st...> - 2002-12-07 00:24:43
|
On Thu, 5 Dec 2002, Max Horn wrote: > On OSX, starcon2.c *MUST* #include <SDL.h>. > > The reason is that before the normal main(), a special SDL provide > main must be run, to setup various things, and run a Cooca runloop > (feel free to ask for details, I wrote a good part of that code :-). > To this end, SDL.h has a #define main SDL_main in it. > > The simple fix is to insert > #include <SDL.h> > into starcon2.c. I hope this breaks no other system (in fact I don't > see why it should). I will commit this, as there seems to be no other choice. I would have liked to keep SDL and the main program seperate. I don't see why SDL even does it that way; a library can itself arrange for an initialisation function to be called before main(). At least using gcc, but other compilers probably too. Serge |