diff options
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/backend/plugin.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmrstak/backend/plugin.hpp b/xmrstak/backend/plugin.hpp index ff7c9d8..7ba9e6f 100644 --- a/xmrstak/backend/plugin.hpp +++ b/xmrstak/backend/plugin.hpp @@ -37,7 +37,13 @@ struct plugin return; } #else - libBackend = dlopen((params::inst().executablePrefix + "/lib" + libName + ".so").c_str(), RTLD_LAZY); + // `.so` linux file extention for dynamic libraries + std::string fileExtension = ".so"; +# if defined(__APPLE__) + // `.dylib` Mac OS X file extention for dynamic libraries + fileExtension = ".dylib"; +# endif + libBackend = dlopen((params::inst().executablePrefix + "/lib" + libName + fileExtension).c_str(), RTLD_LAZY); if(!libBackend) { std::cerr << "WARNING: "<< m_backendName <<" cannot load backend library: " << dlerror() << std::endl; |