Problem using SDL2 on windows

202 views
Skip to first unread message

Laurent Moussault

unread,
Jun 17, 2013, 8:44:00 AM6/17/13
to golan...@googlegroups.com
Hi,

I'm trying to use the SDL2 library with cgo on windows:


but I have the following error at execution:

    SDL_Init failed: Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?

The equivalent C program compiles and runs fine, with the exact same flags passed to gcc. My guess is that this has to do with redefinition of "main" to "SDL_main" required by SDL2 on windows, but I'm not sure. I have no problems on Linux.

It seems some people have successfully used SDL on windows in the past, does anybody knows how this was achieved?

Thanks,

-- 
Laurent Moussault
Reply all
Reply to author
Forward
0 new messages