[SDL] sdlmain

Peter Mulholland darkmatter at freeuk.com
Tue Jul 4 10:12:51 PDT 2006


Julien Lecomte wrote:
> 
> Since you know if you'll have a console or not, you can compile two 
> SDLmain libraries (one with --disable-stdio-redirect, see FAQ: 
> http://www.libsdl.org/cgi/docwiki.cgi/FAQ_20Console) which I'll name 
> libSDLconsole and libSDLwindows, and use the correct one at link time.
> 
> You can then use two different command lines for two different targets:
> $ gcc -mconsole foobar.c -lmingw32 -lSDLconsole -lSDL
> $ gcc -mwindows foobar.c -lmingw32 -lSDLwindows -lSDL

This is exactly what the Visual C++ versions do. There is a version 
with, and without stdio console support.

Pete.







More information about the SDL mailing list