'
what(): boost::dll::shared_library::get() failed: The specified
Hello,
I'm using boost 1.68 on MinGW-w64 (Windows 10). I'm trying a simple
plugin that works fine under Linux and FreeBSD
However, on Windows boost::dll::import_alias triggers an exception:
terminate called after throwing an instance of
'boost::exception_detail::clone_implboost::system::system_error
procedure could not be found
This is the plugin (plugin.cpp)
#include <iostream>
#include
namespace custom {
void my_function()
{
puts("CALLED");
}
} // !custom
BOOST_DLL_ALIAS(custom::my_function, my_function)
I compile using:
g++ -std=c++17 -shared -o plugin.dll plugin.cpp -lboost_system-mt
And the simple main.cpp file:
#include
int main()
{
using my_function = void ();
auto f =
boost::dll::import_alias("./plugin.dll", "my_function");
}
What's strange, nm does not report any kind of unmangled symbols related
to "my_function":
$ nm plugin.dll | grep my_function
0000000067e81422 t _GLOBAL__sub_I__ZN6custom11my_functionEv
0000000067e813b0 T _ZN6custom11my_functionEv
It should contains something starting with boostdll_ isn't it? What's
happening there?
Do I miss something?
--
David