[SDL] Question re SDLmain Design Concept
Peter Mulholland
darkmatter at freeuk.com
Sun Jun 4 07:47:52 PDT 2006
Hello Doug,
Sunday, June 4, 2006, 5:48:40 AM, you wrote:
D> Firstly, this is not a complaint. Basically, I'm just wondering why
D> there is an SDLmain.lib that links code into my project rather than a
D> one time initialization call, something like SDL_OnetimeInit().
D> I have a desire to build my application using STATIC library linking
D> (not the dynamic linking that SDL forces). I discovered that if I
D> rebuild SDLmain using a static library build, and if I say name it
D> SDLmain-static.lib, then I can build my project using statically linked
D> libraries.
D> In the current design, SDLmain.lib forces all applications to be
D> dynalinked only (unless I rebuild and support another SDLmain.lib that
D> is statically linked). Again, this is an easy workaround, but I
D> wondering, am I missing something here in the design concept?
D> For the sake of completeness, the reason I want my application to
D> statically link is because I'm using VS 2005. Any application built
D> with VS 2005 that is a statically linked release build will run on any
D> computer. An application built with VS 2005 that is dynamically linked
D> requires the MS redistributable SxS assemblies to also be installed on
D> all target systems (somewhat of a pain).
There is nothing to stop you statically linking the runtime libs, and
dynamically linking SDL. All you have to do is rebuild SDLmain so that
it also uses the runtime libs statically. The main SDL library will
continue to work just fine without rebuilding.
VS2005 doesn't let you create an app that just uses MSVCR71.dll or
whatever ? That's really bad if it doesn't.
--
Best regards,
Peter mailto:darkmatter at freeuk.com
More information about the SDL
mailing list