Skip to content

Commit

Permalink
Adjust for breaking change in Boost DLL 1.76
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlangs authored and Levi-Armstrong committed Mar 21, 2022
1 parent e8e7be3 commit bfa7976
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tesseract_common/include/tesseract_common/class_loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ std::shared_ptr<ClassBase> 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<ClassBase> plugin = boost::dll::import_symbol<ClassBase>(lib, symbol_name);
#else
boost::shared_ptr<ClassBase> plugin = boost::dll::import<ClassBase>(lib, symbol_name);
#endif
return std::shared_ptr<ClassBase>(plugin.get(), [plugin](ClassBase*) mutable { plugin.reset(); });
}

Expand Down

0 comments on commit bfa7976

Please sign in to comment.