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

做~自己de王妃 提交于 2019-12-23 17:15:10

问题


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

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