Boost.Python examples, Windows 7 x64, “ImportError: DLL load failed: The specified module could not be found.”

倖福魔咒の 提交于 2019-11-30 15:27:44

Two solution, no need to use regedit

  1. add BOOST_PYTHON_STATIC_LIB marco when build your dll. It will let boost.python static link to your dll file rather than dynamic load in runtime.
  2. add boost.python dll to PATH or copy it to same dir where your dll locate

The problem was with the KB2264107 Windows update (http://support.microsoft.com/kb/2264107), "messing" with DLL search routine (security fix). Setting the registry value [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] : CWDIllegalInDllSearch to 0, allowed to properly load DLL files and properly import .pyd modules. This may also happen on other Windows versions.

my soluition is download microsoft visual c++ 2015 redistribute https://www.microsoft.com/en-us/download/details.aspx?id=48145

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!