[SDL] Question re SDLmain Design Concept
Brian Barrett
brian.ripoff at gmail.com
Sun Jun 4 05:42:48 PDT 2006
Im sure that it is to keep SDL client programs source compatible across
different OSes. So even though windows needs a winmain or whatever, you dont
have to provide one, as SDLmain does. However, I have heard that you can
write your one platform specific main, and not link to SDLmain at all,
provided you do the setup that SDLmain does, see the source for the various
platforms for details.
I believe that SDLmain basically gives
Finally, you are aware that statically linking to SDL forces you to relesae
at least the object files of your program, or the source code.
On 6/4/06, Doug <biteme at bitbasher.net> wrote:
>
> Firstly, this is not a complaint. Basically, I'm just wondering why
> there is an SDLmain.lib that links code into my project rather than a
> one time initialization call, something like SDL_OnetimeInit().
>
> I have a desire to build my application using STATIC library linking
> (not the dynamic linking that SDL forces). I discovered that if I
> rebuild SDLmain using a static library build, and if I say name it
> SDLmain-static.lib, then I can build my project using statically linked
> libraries.
>
> In the current design, SDLmain.lib forces all applications to be
> dynalinked only (unless I rebuild and support another SDLmain.lib that
> is statically linked). Again, this is an easy workaround, but I
> wondering, am I missing something here in the design concept?
>
> For the sake of completeness, the reason I want my application to
> statically link is because I'm using VS 2005. Any application built
> with VS 2005 that is a statically linked release build will run on any
> computer. An application built with VS 2005 that is dynamically linked
> requires the MS redistributable SxS assemblies to also be installed on
> all target systems (somewhat of a pain).
>
> Thanks,
> Doug.
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060604/fb6da9a0/attachment.html
More information about the SDL
mailing list