问题
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 found." 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?
回答1:
Everyone having this problem should probably check out the dependency walker, and see what DLLs are missing. It solved my problem.
来源:https://stackoverflow.com/questions/4684697/running-a-swig-bound-pythonc-program-gives-a-missing-dll-error-when-running-on