"plugins/amoeba/openmmapi/src/HippoNonbondedForceImpl.cpp" did not exist on "0b22cac142bbab27530bab10b5801c00b711cb3a"
Commit e34f0b33 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed Linux compilation error. Since dlopen() doesn't support RTLD_FIRST on...

Fixed Linux compilation error.  Since dlopen() doesn't support RTLD_FIRST on Linux, both plugin initializer functions are now mandatory.
parent bfb36258
......@@ -9,7 +9,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2009 Stanford University and the Authors. *
* Portions copyright (c) 2009-2011 Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
......@@ -33,24 +33,23 @@
* -------------------------------------------------------------------------- */
/**
* This file contains declarations for initialization functions that may be defined
* This file contains declarations for initialization functions that must be defined
* by plugins, and that are invoked after the plugins have been loaded. There are
* two such functions: one for registering new Platforms, and one for adding new
* KernelFactories to existing Platforms. Each of these functions is optional; most
* plugins implement one or the other of them, but not both.
* KernelFactories to existing Platforms.
*/
/**
* If a plugin defines a new Platform, it should define this function. It will be
* invoked after the plugin is loaded, and should register the new Platform by
* This function registers new Platforms that are defined by the plugin. It will be
* invoked after the plugin is loaded, and should register the new Platforms by
* calling Platform::registerPlatform().
*/
extern "C" void registerPlatforms();
/**
* If a plugin defines a new KernelFactory for an existing Platform, it should define
* this function. It will be invoked after the plugin is loaded, and should register
* the new factory by calling registerKernelFactory() on the appropriate Platform object.
* This function registers new KernelFactories for existing Platforms.
* It will be invoked after the plugin is loaded, and should register
* the new factories by calling registerKernelFactory() on the appropriate Platform objects.
* It is not invoked until after registerPlatforms() has been called on every plugin,
* thus avoiding initialization order problems when one plugin adds a KernelFactory
* to a Platform defined by another plugin.
......
......@@ -182,7 +182,7 @@ static void initializePlugins(vector<HMODULE>& plugins) {
}
#else
static void* loadOneLibrary(const string& file) {
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_GLOBAL | RTLD_FIRST);
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_GLOBAL);
if (handle == NULL)
throw OpenMMException("Error loading library "+file+": "+dlerror());
return handle;
......
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