I am new to SDL, and I am just curious why does sdl use static and dynamic libraries? I mean, what functions are in sdl.dll, and why is it linked dynamically instead of statically? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SDL.dllcontains implementations of all of the functions that you use from SDL, such asSDL_Init()andSDL_SetVideoMode(). It’s linked dynamically to allow drop-in replacement of the library with a newer version, without breaking compatibility with existing applications—the SDL interface does not change nearly as often as the implementation. Dynamic libraries provide decoupling between interface and implementation, at the cost of whatever it takes to load them dynamically: searching for a file, loading it, complaining if it’s not available, and so on.An application is more modular using dynamic libraries, and the executable will tend to remain small. It is possible to link statically against SDL, under which circumstances the size of your executable will include the (modest) size of the SDL library, and upgrading to a newer version of SDL will require recompiling your application.