Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QT Release build DLL procedure entry point error

I built an application in Qt Creator that does some image processing with CImg. It runs fine when I run it from the inside IDE, but if I try to launch it from its directory, it throws the following error.

The procedure entry point ??4QString@@QAEAAV0@$$QAV0AAZ could not be located 
in the dynamic link library QtCore4.dll

Everything points to having multiple version of the DLLs installed. I found my Xilinx IDE uses the Qt libraries, but the DLLs in question are the same version. I'm not really a software guy, and at a loss here.

like image 776
Matt Young Avatar asked Jul 27 '12 19:07

Matt Young


1 Answers

Even if the library version is the same they may be non compatible. For instance they were compiled with different configurations, like with or without STL support, OpenGL, SQL drivers...

The simplest way to fix it should be to move Qt SDK's path at beginning of PATH environment variable. This way whenever you run an executable that requires Qt libraries it will load the ones shipped with SDK (the first ones found in PATH), unless there are already copies of QtCore4.dll, QtGui4.dll... in the executable's directory. For this reason if you redistribute your application you might also have to ship the libraries in its directory.

Another option is static linking, but you will be required to provide source code under the (L)GPL licence.

like image 130
Claudio Avatar answered Nov 05 '22 01:11

Claudio