Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
9ef98fd3
Unverified
Commit
9ef98fd3
authored
Mar 10, 2020
by
peastman
Committed by
GitHub
Mar 10, 2020
Browse files
Merge pull request #2592 from peastman/dlopen
Fix error loading CPU PME on Mac
parents
d510e164
219361da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
olla/src/Platform.cpp
olla/src/Platform.cpp
+4
-0
No files found.
olla/src/Platform.cpp
View file @
9ef98fd3
...
@@ -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
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment