![]() ![]() You can spot dynamic libraries by their extensions. When you start the executable, it reviews its list of dynamic libraries and tries to load them. This is fine in some cases, but there can be legal and functional reasons that you do not want to include someone else’s code directly in your executable.ĭynamic libraries allow you to store compiled code in separate files that are loaded by your executable at runtime. Options 1 and 2 result in the external code residing directly inside your executable, so it actually causes the executable’s size to increase. Create a “dynamic library,” which can then be referenced by your executable when it runs.Create a “static library,” which can then be included in your executable when you compile it.Copy the source files directly into your own source code directory and compile them as part of your application.If you download someone else’s code and want to use it in your application, there are a few ways you could go about it: I was recently learning how Mac and Linux machines load dynamic libraries, so I thought I’d write a quick post about it. On Mac and Linux, however, the situation is different and requires some consideration. On Windows, when an executable needs a dynamic library, it searches for it in a few predefined locations, such as “the same directory as the executable”. ![]() In all these cases, the library is included as a “dynamic library” (as opposed to a “static library”). G-Engine uses various third-party libraries: ffmpeg for video playback, fmod for audio playback, zlib for decompression, etc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |