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
a3b1009a
Commit
a3b1009a
authored
Feb 02, 2011
by
Mark Friedrichs
Browse files
Modified OpenMMSerialization lib names for different OSs
parent
b2c28984
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
plugins/amoeba/serialization/src/AmoebaSerializationProxyRegistration.cpp
...erialization/src/AmoebaSerializationProxyRegistration.cpp
+10
-3
No files found.
plugins/amoeba/serialization/src/AmoebaSerializationProxyRegistration.cpp
View file @
a3b1009a
...
...
@@ -93,8 +93,8 @@ extern "C" void registerAmoebaSerializationProxies() {
// is there a cleaner solution?
std
::
string
file
=
"libOpenMMSerialization.so"
;
#ifdef WIN32
std
::
string
file
=
"OpenMMSerialization.dll"
;
// Tell Windows not to bother the user with ugly error boxes.
const
UINT
oldErrorMode
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
HMODULE
handle
=
LoadLibrary
(
file
.
c_str
());
...
...
@@ -105,9 +105,16 @@ extern "C" void registerAmoebaSerializationProxies() {
throw
OpenMMException
(
message
);
}
#else
std
::
string
fileName
=
"OpenMMSerialization"
;
std
::
string
file
=
"libOpenMMSerialization.so"
;
std
::
string
macFile
=
"libOpenMMSerialization.dylib"
;
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
);
if
(
handle
==
NULL
)
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
if
(
handle
==
NULL
){
handle
=
dlopen
(
macFile
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
);
if
(
handle
==
NULL
){
throw
OpenMMException
(
"Error loading library "
+
fileName
+
": "
+
dlerror
());
}
}
#endif
...
...
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