Use dlopen () to open the library, and then dlsym () to find the characters. If you rely on a dynamic linker, you must know the path in advance and set it either through rpath or through environment variables. Rpath can take relative paths, so this may work for you ... but most likely it is the best solution for dlopen () and friends (although it may take some work to convert to function pointers).
The advantage of dlopen (), etc. - This is the same (or similar) code that will work with other * nix.
You can also look at NSAddImage (), which is OSX specific, but should also do what you want.
source share