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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With