Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.cpp @ 431:9e1e12d1fbc3
* Load with RTLD_GLOBAL, otherwise Vampy plugins can't load their interpreters
author | Chris Cannam |
---|---|
date | Thu, 19 Jun 2008 15:11:28 +0000 |
parents | 115f60df1e4d |
children | 824a87450f81 |
comparison
equal
deleted
inserted
replaced
430:304fd0223fa6 | 431:9e1e12d1fbc3 |
---|---|
131 | 131 |
132 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE | 132 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE |
133 std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname.toStdString() << std::endl; | 133 std::cerr << "FeatureExtractionPluginFactory::getPluginIdentifiers: trying potential library " << soname.toStdString() << std::endl; |
134 #endif | 134 #endif |
135 | 135 |
136 void *libraryHandle = DLOPEN(soname, RTLD_LAZY); | 136 void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_GLOBAL); |
137 | 137 |
138 if (!libraryHandle) { | 138 if (!libraryHandle) { |
139 std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; | 139 std::cerr << "WARNING: FeatureExtractionPluginFactory::getPluginIdentifiers: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; |
140 continue; | 140 continue; |
141 } | 141 } |
329 | 329 |
330 } | 330 } |
331 | 331 |
332 soname = found; | 332 soname = found; |
333 | 333 |
334 void *libraryHandle = DLOPEN(soname, RTLD_LAZY); | 334 void *libraryHandle = DLOPEN(soname, RTLD_LAZY | RTLD_GLOBAL); |
335 | 335 |
336 if (!libraryHandle) { | 336 if (!libraryHandle) { |
337 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; | 337 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Failed to load library " << soname.toStdString() << ": " << DLERROR() << std::endl; |
338 return 0; | 338 return 0; |
339 } | 339 } |