cannot load module 'libvips-42.dll' on Windows
Closed this issue · 7 comments
Hi,
I think you can use os.setenv("PATH", ...)
in your code before starting FFI. Though I've not tested it.
Then it'll probably be one of the classic Windows linking issues. Either you're trying to mix 32- and 64-bit code, or you have a DLL clash on your path.
Look at your path carefully and make sure you only have one version of each DLL on the PATH variable.
Unfortunately this has probably broken some other software you have installed :(
The libvips BIN area includes a lot of common DLLs, such as libjpeg. If you have another package installed which also includes libjpeg.dll, and that older libjpeg.dll is not binary compatible with the one that libvips ships, that other package will no longer work.
It's safest not to change PATH, and instead set PATH in your program during startup.
Perhaps with https://stackoverflow.com/questions/41367667/set-shell-environment-variable-in-a-lua-5-3-script ?
Ok,Thank you for your suggestion. I will try it out.