QT发布构建DLL过程入口点错误 [英] QT Release build DLL procedure entry point error

查看:140
本文介绍了QT发布构建DLL过程入口点错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Qt Creator中构建了一个使用CImg进行图像处理的应用程序。当我从内部的IDE运行它时,它运行正常,但是如果我尝试从它的目录启动它,它会抛出以下错误。

 过程入口点4QString @@ QAEAAV0 @ $$ QAV0AAZ在动态链接库中无法找到
QtCore4.dll

所有内容都指向安装了多个版本的DLL。我发现我的Xilinx IDE使用了Qt库,但是所讨论的DLL是相同的版本。我不是一个软件人,而且在这里也是一样。

解决方案

即使图书馆版本是一样的,他们可能会不兼容。例如,他们编译有不同的配置,如有或没有STL支持,OpenGL,SQL驱动程序...



最简单的方法来解决它应该是移动Qt SDK的路径在 PATH 开始环境变量。这样,每当运行一个需要Qt库的可执行文件,它将加载SDK附带的那些(在 PATH 中找到的第一个),除非已经有QtCore4.dll的副本,QtGui4.dll ...在可执行文件的目录中。因此,如果您重新分发您的应用程序,您可能还必须在其目录中发送库。



另一个选项是静态链接,但您将需要提供源代码(L)GPL许可证。


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.

解决方案

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.

这篇关于QT发布构建DLL过程入口点错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆