[SDL] cross-compiling woes

Paul Pelzl pelzlpj at eecs.umich.edu
Mon Jan 17 20:57:32 PST 2005


On Tue, Jan 18, 2005 at 02:00:05AM -0300, Gabriel wrote:
> Your entry point is main(), right? I use something like this :
> 
> #ifdef WIN32
> extern "C"
> {
> 
> int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> char* lpCmdLine, int nCmdShow)
> {
...
> 	// Do main
> 	int nRet = main(nParms + 1, pParms);
...
> }
> #endif


OK, thanks, that does work.  But should this be necessary?  I thought
SDL_main worked some magic to call the right entry point across all
platforms.  And I didn't have any problems using main() with the
precompiled mingw libraries provided on the SDL website.

Paul






More information about the SDL mailing list