diff --git a/tesseract_common/include/tesseract_common/class_loader.hpp b/tesseract_common/include/tesseract_common/class_loader.hpp index d5948c2c6a7..8e1704856b4 100644 --- a/tesseract_common/include/tesseract_common/class_loader.hpp +++ b/tesseract_common/include/tesseract_common/class_loader.hpp @@ -70,7 +70,11 @@ std::shared_ptr ClassLoader::createSharedInstance(const std::string& throw std::runtime_error("Failed to find symbol '" + symbol_name + "' in library: " + decorate(library_name, library_directory)); +#if BOOST_VERSION >= 107600 + boost::shared_ptr plugin = boost::dll::import_symbol(lib, symbol_name); +#else boost::shared_ptr plugin = boost::dll::import(lib, symbol_name); +#endif return std::shared_ptr(plugin.get(), [plugin](ClassBase*) mutable { plugin.reset(); }); }