On OS X, how can code in a dylib find the path it was loaded from, at runtime?
Coming from a Windows background, I'm used being able to call GetModuleFileName(dllHandle,...)
.
There exists NSGetExecutablePath()
which will give me the path of the executable for the current process. Is there an equivalent to give me the current dylib path?