From bfa7976a6e37e914e88461ad9ecafe5e2156b348 Mon Sep 17 00:00:00 2001 From: Josh Langsfeld Date: Sun, 20 Mar 2022 22:58:31 -0500 Subject: [PATCH] Adjust for breaking change in Boost DLL 1.76 --- tesseract_common/include/tesseract_common/class_loader.hpp | 4 ++++ 1 file changed, 4 insertions(+) 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(); }); }