I'm trying to resolve the following problem: My code runs on Windows and on Linux. I need to know the path from where the currently running .dll (.so) was loaded, so that I can also find the path to some satellite files I need. On Windows I use:
char buffer[1024];
GetModuleFileName(GetModuleHandle("MyLibrary.dll"), buffer, MAX_PATH);
What would be the equivalent code on Linux?