Sdlmain not required any more?

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 that
module 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. :)~
Doug.

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.

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

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

-Eric–
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

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 :>> 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.

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

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

-Eric

Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/


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