程序意外结束 - QT creator [英] The program has unexpectedly finished - QT creator
问题描述
我正在尝试使用 QT creator 开发使用 QT 框架的 GUI/控制台应用程序.我正在使用 Windows XP.我安装了 QT 4.8.3 和 mingw.两者都安装没有任何错误.然后我安装了 QT Creator.QT 版本:路径中的 Qt 4.8.2 (4.8.2)Mingw(手动)
编译路径:C:\MinGW\bin\g++.exe调试器路径:C:\MinGW\bin\gdb.exemkspec: win32-g++
I am trying to use QT creator to develop GUI/Console applications using QT framework. I am using windows XP. I installed QT 4.8.3 and mingw. Both are installed without any error.
And then I installed QT creator.
QT Version: Qt 4.8.2 in PATH (4.8.2)
Mingw(manual)
Compiler path: C:\MinGW\bin\g++.exe
Debugger path: C:\MinGW\bin\gdb.exe
mkspec: win32-g++
EnvironmentVariables:
QTDIR, PATH, MinGW,
PATH includes 4.8.2\bin; mingw\bin
INCLUDE : 4.8.2\include
当我尝试使用 qt creator 开发应用程序时,它已正确构建,并且生成的二进制文件也没有任何错误.但是当我尝试运行该应用程序时,它崩溃了
When i try to develop an application using qt creator, it has been built properly and binary is also generated without any error. But when I try to run the application, It is crashed saying that
程序意外结束.C:\Qt\4.8.2\examples\widgets\analogclock-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug\debug\analogclock.exe 退出,代码为 -1073741819
The program has unexpectedly finished. C:\Qt\4.8.2\examples\widgets\analogclock-build-desktop-Qt_4_8_2_in_PATH__4_8_2__Debug\debug\analogclock.exe exited with code -1073741819
这个崩溃来自QT库提供的示例应用程序(它是模拟时钟)
This crash came for example application provided by QT library( it is analog clock)
请尝试帮助我,我需要设置任何变量或其他
Please try to help me in this, Do I need to set any variables or other
非常感谢.
推荐答案
我遇到了完全相同的问题,昨天已经解决了.
I had exactly the same problem and solved it yesterday.
如果 g++ --version
的输出不是 4.4
之类的东西,这是二进制不兼容.您必须获得 MinGW 4.4.它包含在 QtSDK 中,或者至少包含在 QtSDK 中.接下来,配置您的 QtCreator 设置(构建和运行 > 工具链").
If the output of g++ --version
doesn't say something like 4.4
, this is binary incompatibility. You'll have to get MinGW 4.4. It is included in QtSDK, or at least was.
Next, configure your QtCreator settings ("Build & Run > Toolchains").
这篇关于程序意外结束 - QT creator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!