Commit 219361da authored by peastman's avatar peastman
Browse files

Fix error loading CPU PME on Mac

parent d510e164
...@@ -221,8 +221,12 @@ static void initializePlugins(vector<HMODULE>& plugins) { ...@@ -221,8 +221,12 @@ static void initializePlugins(vector<HMODULE>& plugins) {
static void* loadOneLibrary(const string& file) { static void* loadOneLibrary(const string& file) {
#ifdef __PNACL__ #ifdef __PNACL__
throw OpenMMException("Loading dynamic libraries is not supported on PNaCl"); throw OpenMMException("Loading dynamic libraries is not supported on PNaCl");
#else
#ifdef __APPLE__
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_GLOBAL);
#else #else
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_LOCAL); void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_LOCAL);
#endif
if (handle == NULL) { if (handle == NULL) {
throw OpenMMException("Error loading library "+file+": "+dlerror()); throw OpenMMException("Error loading library "+file+": "+dlerror());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment