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.