[SDL] is SDL supposed to be using WinMain?

Lilith Calbridge lilith at dcccd.edu
Fri Sep 7 07:17:16 PDT 2007


I won't claim expertise on this but I suspect what's happening is that
winmain() is used but it's disguised as simple main().  Since SDL has
been developed so as to be portable across multiple systems, it goes
with the C standard of using main() as the entry point.  If development
is done in a Windows oriented compiler then main() in the code gets
transformed into winmain() where and when needed.

-- 
Lilith

>>> On 9/7/2007 at 4:00 AM, "malik martin" <laserbeak43 at gmail.com>
wrote:
> Hi there,
> i'm using some code that works with SDL and i get an exception at
> runtime that i'm trying to debug. i'm very new to the debugger and
am
> learning by trial and error in visual studio 2005 as we speak.
> 
> i'm stepping into the code from the beginning, and not far into it,
i
> end up at a file named crtexe.c
> and i noticed:
> 
> #ifdef _WINMAIN_
>         _TUCHAR *lpszCommandLine;
>         STARTUPINFO StartupInfo;
>         BOOL inDoubleQuote=FALSE;   <-------cursor is on this line.
> 
> any idea about wether or not it should be doing this?
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org 
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


More information about the SDL mailing list