我的程序意外地完成了
这个最简单的程序在发布模式下编译时会出现错误,但在调试模式下编译正常:
#include <QApplication>
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
return app.exec();
}
错误(从qt控制台输出)
*启动 C:\excercizes\QT_projects\Line_Counter-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release\release\Line_Counter.exe... 计划意外地结束了。 C:\excercizes\QT_projects\Line_Counter-build-desktop-Qt_4_7_4_for_Desktop__-_MinGW_4_4__Qt_SDK__Release\release\Line_Counter.exe 退出,代码为 -1073741511*
有人有过这样的经历吗?
this simplest program gives error when compiled in release mode, but compiles fine in debug mode:
#include <QApplication>
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
return app.exec();
}
ERROR (output from qt's console)
*Starting C:\excercizes\QT_projects\Line_Counter-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release\release\Line_Counter.exe...
The program has unexpectedly finished.
C:\excercizes\QT_projects\Line_Counter-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release\release\Line_Counter.exe exited with code -1073741511*
Anyone had this experience?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
值-1073741511是十六进制的0xC0000139,这是错误代码STATUS_ENTRYPOINT_NOT_FOUND。这意味着某些 DLL 被 EXE 或另一个 DLL 加载,但它缺少 EXE 或另一个 DLL 所期望的函数。
事件查看器可能会在错误发生时向您显示哪个DLL缺少什么功能。 Dependency Walker 也会向您展示这一点,以及整个 DLL 结构。
Value -1073741511 is 0xC0000139 hexadecimal, which is error code STATUS_ENTRYPOINT_NOT_FOUND. This means that some DLL is loaded by EXE or another DLL, but it lacks a function that EXE or another DLL is expecting there.
Event Viewer may show you what DLL is lacking what function when the error occurs. Dependency Walker will also show you this, and the whole DLL structure as well.
在大多数情况下,这是因为可执行文件正在查找的必要 .dll 文件丢失。
最直接的方法是从 Qt 安装中复制以下文件(例如
C:\Qt\Qt5.4.2\5.4\mingw491_32\bin
):...进入 /debug 和 /release 目录以进行 DEBUG 和 RELEASE 配置。
In most cases this is because the necessary .dll files that the executable is looking for are missing.
The most straightforward approach is to copy the following files from your Qt installation (e.g.
C:\Qt\Qt5.4.2\5.4\mingw491_32\bin
):... into the /debug and /release directories for the DEBUG and RELEASE configurations.