“无法加载... DLL无法加载库... DLL”

最后编辑了

症状

You are getting error messages like these when trying to load your custom Qt wrapper library in the Squish Wrapper Explorer (wrapperexplorer.exe):

加载c:/users/myuser/squish-4.1.0-qt-src/example/qt4/canvas/canvaswrapper.dll无法加载库c:/users/myuser/squish-4.1.0-qt-src/example / qt4/canvas/canvaswrapper.dll:找不到指定的模块。

无法加载c:/users/myuser/squish-4.1.0-qt-src/examples/qt4/canvas/canvaswrapper.dll无法加载库c:/users/myuser/squish-4.1.0-qt-src/examples / qt4/canvas/canvaswrapper.dll:Das Bygebene Modul Wurde Nicht Gefunden。

可能的原因

Custom Qt wrapper libraries are linked against the .exe files that they are made for as well. This means that the .exe file must be in the same folder as the custom wrapper library, in the current directory, or in a directory listed in the PATH environment variable.

For example in case of the above canvasWrapper.dll the associated .exe file is C:\Users\myuser\squish-4.1.0-qt-src\example\qt4\canvas\canvasWrapper.dll.

So to load canvasWrapper.dll with the Squish Wrapper Explorer you can do the following in cmd.exe:

设置当前工作目录:

cd C:\Users\myuser\squish-4.1.0-qt-src\example\qt4\canvas

C:\Users\myuser\squish-4.1.0-qt-src\bin\wrapperexplorer.exe

Adjusting PATH:

set PATH=C:\Users\myuser\squish-4.1.0-qt-src\example\qt4\canvas;%PATH%

C:\Users\myuser\squish-4.1.0-qt-src\bin\wrapperexplorer.exe