CFFI Not Loading Dependent Libraries?

依然范特西╮ 提交于 2019-12-05 19:50:28

In your case it's probably not CFFI but Windows DLL search rules that make this happen.

As cygblas-0.dll is in the c:\cygwin64\lib\lapack directory, any dependencies it may have are searched from that same directory, the current directory, Windows directories, and from PATH.

If you do not have c:\cygwin64\bin in your path, the DLLs cannot be found. cffi::*foreing-library-directories* does not affect the Windows functionality; CFFI simply executes a call to LoadLibrary with a full path to the DLL.

As a solution, I suggest you configure your PATH to include the c:\cygwin64\bin directory, which is a good idea in any case. Alternatively, you could modify the PATH environment variable in your code before the call to load-foreign-library, but the way it's done is implementation dependent.

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