The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
sdlmain not required any more?
Doug
Guest

I just saw this in the FindSDL.cmake thread:
"Anyway, SDLmain is finally gone for SDL 2. But the CMake module has
not been updated for 2. I actually recommend a new CMake module be written for SDL 2. (There are some weird things going on in thatmodule and there are some corner case bugs in there, but they were not changed to not break compatibility. We get a clean slate with SDL 2.)"


Oh wow, that's totally blown my world. 


Lo, I tried and it works without linking libSDL2main.a, even though both the configure and cmake scripts still build that library.


Is there a reason we still build it if it's not required?


Btw, who ever put the work into making this happen with SDL2, this is totally awesome. Smile


~
Doug.
sdlmain not required any more?
Eric Wing
Guest

Quote:
Lo, I tried and it works without linking libSDL2main.a, even though both
the configure and cmake scripts still build that library.

Is there a reason we still build it if it's not required?


If I recall, all the Unix systems except for Mac never actually needed
SDLmain even in the 1.2 days and they just provided an empty library
you could link with for some consistency if you were in the habit.



Quote:
Btw, who ever put the work into making this happen with SDL2, this is
totally awesome. Smile


I think Sam is the one to thank, at least on Mac Smile

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
sdlmain not required any more?
Sik


Joined: 26 Nov 2011
Posts: 905
While we're on the topic of SDL_main, let's remember that on Windows
you only need it with Visual Studio. If you're using MinGW you can use
the normal main regardless of whether it's a console or a GUI program.

2012/11/27 Eric Wing:
Quote:
Quote:
Lo, I tried and it works without linking libSDL2main.a, even though both
the configure and cmake scripts still build that library.

Is there a reason we still build it if it's not required?


If I recall, all the Unix systems except for Mac never actually needed
SDLmain even in the 1.2 days and they just provided an empty library
you could link with for some consistency if you were in the habit.



Quote:
Btw, who ever put the work into making this happen with SDL2, this is
totally awesome. Smile


I think Sam is the one to thank, at least on Mac Smile

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org