[SDL] SDL on MinGW -- problem with SDLMain and WinMain()

Alan Wolfe atrix2 at cox.net
Wed Nov 26 20:13:01 PST 2003


i use mingw and it works great for me.

i attached a sample makefile, i hope it helps! (:

  ----- Original Message ----- 
  From: John Silicon 
  To: sdl at libsdl.org 
  Sent: Wednesday, November 26, 2003 7:46 PM
  Subject: [SDL] SDL on MinGW -- problem with SDLMain and WinMain()


  On to a new project now, and the team wants to make sure that all our code compiles on GCC, so I went to good old MinGW.  I followed all the instructions on http://www.libsdl.org/extras/win32/mingw32/README.txt, and everything went great -- but I've ran into one problem.  I'm compiling with both libsdl.a and libsdlmain.a, but GCC is still giving me grief about WinMain() not being defined.  I've managed to fix the problem by compiling sdlmain.c straight-up into an object file and compiling that into the executable, but it seems a bit odd that this is what is nessecery to get SDL to work under MinGW.  Has anyone seen this problem before, or should I just start over and re-install SDL and MinGW and see if it's something weird about my sorta patch-together configuration?  Does anyone know of any way to fix it?



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.541 / Virus Database: 335 - Release Date: 11/14/2003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031126/e03a405d/attachment-0008.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 198 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031126/e03a405d/attachment-0008.obj>


More information about the SDL mailing list