Loading Shared Libraries on Linux

Nearly three years ago, I wrote a post about wrangling dynamic/shared libraries for Mac applications. I recently faced the same challenge on Linux, so I figured I’d write a follow up.

If you’re new to dealing with shared libraries, I’d recommend reviewing the previous post first - it covers some fundamentals that I won’t rehash here. Linux and Mac handle dynamic libraries in similar ways - but as you might guess, the tools used and some details vary.

[Read More]

Loading Dynamic Libraries on Mac

G-Engine uses various third-party libraries: ffmpeg for video playback, fmod for audio playback, zlib for decompression, etc. In all these cases, the library is included as a “dynamic library” (as opposed to a “static library”).

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”. On Mac and Linux, however, the situation is different and requires some consideration.

I was recently learning how Mac and Linux machines load dynamic libraries, so I thought I’d write a quick post about it.

[Read More]