"platforms/vscode:/vscode.git/clone" did not exist on "59c809c0b1bc1ab23527575bbbdc1235c37745c4"
Unverified Commit 9ef98fd3 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2592 from peastman/dlopen

Fix error loading CPU PME on Mac
parents d510e164 219361da
......@@ -221,8 +221,12 @@ static void initializePlugins(vector<HMODULE>& plugins) {
static void* loadOneLibrary(const string& file) {
#ifdef __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
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_LOCAL);
#endif
if (handle == NULL) {
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