"Loading Qt Wrapper failed", "The specified procedure could not be found." (Qt)

Last edited on

Symptoms

The Qt 4 binary edition is linked against a Qt 4 binary edition from The Qt Company, or against a Qt 4 source build with the standard Qt configuration.

If a Qt 4 library is used in which certain features/modules are disabled (i.e., not the standard Qt binary), then you typically get the following error messages in the Runner/Server log:

S: Preload (...): Loading Qt Wrapper failed: The specified procedure could not be found.

S: Preload (...): Loading Qt Wrapper failed: Die angegebene Prozedur wurde nicht gefunden.

(The same thing can happen in Qt 3 if the application's Qt libraries and the ones Squish was built with are configured differently.)

Causes

This error message means that one (or several) of the Qt DLLs is incompatible to the ones the Squish binary package was built with. (The Squish Qt 4 binary packages are linked against the Qt 4 binary packages from The Qt Company, or against a Qt 4 source build using the default Qt configuration.)

In the simplest case the main configuration difference is that an application's Qt libraries are built without any of the following modules (which are enabled in Qt 4 by default):

If this is the case (if in doubt please ask your application developers), please contact us to provide you with a Squish for Qt package suitable for that configuration. (Please specify which compiler (MSVC6 - MSVC10) or which version of Visual Studio has been used to compile the Qt libraries.)

Solutions

Use a Pure Qt 4 binary package of Squish

Simply using a "Pure Qt 4" binary package of Squish may be sufficient in case only the following default Qt 4 module has been disabled in the Qt libraries of your application:

You can ask Squish support for a package of this type.

Use Qt 4 DLLs from Squish package

Copy the Squish Qt DLLs (C:\Squish-4.x-etc\bin\Qt*4.dll) over the Qt DLLs that your application uses. (Make sure you backup the original DLLs first of course.)

This should be enough to make things work, although in rare cases it isn't sufficient.

While not as clean as the other solutions this is often the fastest solution and is particularly useful to get an application working with Squish for evaluation purposes.

Build the application using a Qt with the standard configuration

Build your application against the Qt binary edition from The Qt Company, or against a Qt 4 source build using the default Qt configuration.

Build Squish from source

Build Squish from source against your own Qt version. This approach requires the Squish source code, and this is only available to Squish licensees, not to evaluators.

If your application does not use the Qt3Support library (and cannot be changed to use it for the purposes of GUI testing), there are some additional steps that must be followed as your application is classified as a "Pure Qt 4" application, for which see: Installation for Testing Pure Qt 4 Applications