Menu

SDL help

2003-01-13
2012-09-26
  • Nobody/Anonymous

    I tried to compile an SDL program that everyone else at this site got working with Dev-C++4.9.7.1, but I have 4.9.7.3 and I keep getting a WinMain@16 error how do I fix this

     
    • Patrick Ogay

      Patrick Ogay - 2003-01-13

      FAQ: if you link a routine with no main().
      You certainly link a subroutine
      Patrick

       
    • Nobody/Anonymous

      These infos are stolen from http://www.libsdl.org

      Q: I get "Undefined reference to 'WinMain@16'"

      A: Under Visual C++, you need to link with SDLmain.lib. Under the gcc build environments including Dev-C++, you need to link with the output of "sdl-config --libs", which is usually: -lmingw32 -lSDLmain -lSDL -mwindows

      hope this will solve your problem.

      Greetings from switzerland
      Thomas

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.