diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-31 22:37:02 +0100 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-31 22:37:02 +0100 |
commit | 65794c5b5b32b7d3d5a64914ccae86797770ca88 (patch) | |
tree | 934d031eeda58b57c2e9aff343d2c694356e9ce3 /xmrstak | |
parent | 69e6013cee02299e4732b02a83025e7011b12f5e (diff) | |
download | xmr-stak-65794c5b5b32b7d3d5a64914ccae86797770ca88.zip xmr-stak-65794c5b5b32b7d3d5a64914ccae86797770ca88.tar.gz |
OSX file file extension (dynamic libraries)
use `.dylib` as dynamic library file extension
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; |