I've got a library compiled to a DLL that works properly in C++ when loaded with boost::dll.
I'd like to load the same binary in Python using pybind11, which works fine by itself. However, the DLL compiled with a PYBIND11_MODULE in addition to a BOOST_DLL_ALIAS fails to load in C++ with boost::dll.
Throws boost::dll::shared_library::load() failed: The specified module could not be found.
The library is for use from C++ but needs some complex functional testing against Python prototype code. It's convenient to imagine a dual-use Python/C++ DLL that has both interfaces in a single binary build.
I've got a library compiled to a DLL that works properly in C++ when loaded with
boost::dll
.I'd like to load the same binary in Python using
pybind11
, which works fine by itself. However, the DLL compiled with aPYBIND11_MODULE
in addition to aBOOST_DLL_ALIAS
fails to load in C++ withboost::dll
.Throws
boost::dll::shared_library::load() failed: The specified module could not be found
.The library is for use from C++ but needs some complex functional testing against Python prototype code. It's convenient to imagine a dual-use Python/C++ DLL that has both interfaces in a single binary build.
But maybe this isn't possible?
I've put a detailed description in this gist.