开发者

Running a SWIG bound Python+C program gives a missing DLL error when running on another computer

开发者 https://www.devze.com 2023-02-05 02:11 出处:网络
So I have compiled a small testing program that uses SWIG as a bridge between python and C. The main part of the program is the python file. The thing runs fine on my own pc, but as soon as I transfer

So I have compiled a small testing program that uses SWIG as a bridge between python and C. The main part of the program is the python file. The thing runs fine on my own pc, but as soon as I transfer it to another, it immediately throws a "ImportError: DLL load failed: The specified module could not be fou开发者_运维问答nd." error. I tried to see if it could be a file location that was statically coded by moving it to another directory on my own pc, which still worked fine. Next I did some debugging in the SWIG python wrapper, and found out what DLL it was loading; whose file path was correct too. My other PC also had the correct path. Does anyone know something that I might have forgotten that causes this error?


Everyone having this problem should probably check out the dependency walker, and see what DLLs are missing. It solved my problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消