[SDL] Help to compile

Igor Castro castrolima at gmail.com
Sun May 20 09:00:49 PDT 2007


Hi! I'm newbie on this list and i cant compile my c++/SDL program under
windows... I use:
gcc SDL_teste.cpp -lSDLmain -lSDL  -mwindows
and get the error msg:
"undefined reference to "WinMain at 16"
the code:
-------------------------------------------------------------
#include <stdio.h>
#include "SDL/SDL.h"
      // include the SDL headers you put in /mingw/include/SDL/

int main(int argc, char *argv[]) {
      // with SDL, you need the argc and argv parameters

  printf("Hello world\n");
        // with SDL, anything you printf will get printed to the
        // file stdout.txt in the current directory, not to the screen
}
---------------------------------------------------------
thanks all!
Igor Castro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070520/d60940ad/attachment.html 


More information about the SDL mailing list