diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-11 12:36:32 +0000 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-11 12:36:32 +0000 |
commit | d794d164163def46a226110c5e04f47596485493 (patch) | |
tree | de2e117aeb22b927140efb63986cc6b8893aa9c0 | |
parent | e6dde6db7c1b59cc3fb145b73e062680dbcf2d67 (diff) |
-rw-r--r-- | plugin.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,7 +1,7 @@ #include "plugin.h" #include <boost/beast/version.hpp> - +#include <boost/version.hpp> #include <boost/dll/import.hpp> #include <boost/filesystem.hpp> @@ -27,7 +27,13 @@ void PluginLoader::load_plugins() dll::fs::path lib_path{path.path()}; try { - boost::shared_ptr<webserver_plugin_interface> plugin = dll::import<webserver_plugin_interface>(lib_path, "webserver_plugin", dll::load_mode::append_decorations); + boost::shared_ptr<webserver_plugin_interface> plugin = dll:: +#if BOOST_VERSION >= 17600 + import_symbol +#else + import +#endif + <webserver_plugin_interface>(lib_path, "webserver_plugin", dll::load_mode::append_decorations); if (plugin) { if (plugin->version() != webserver_plugin_interface::interface_version) throw std::runtime_error("Bad interface version for "s + path.path().generic_string() + ": "s + std::to_string(plugin->version()) + " vs. "s + std::to_string(webserver_plugin_interface::interface_version)); |