本文介绍了cLion + Qt5-退出代码-1073741515(0xC0000135)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用QT5和cLion运行简单的测试,但是我遇到了退出代码墙...这是我的envi:

cLion 2017.2

minGw 5.0 <根据cLion

cMake 3.8.2

Qt 5.9.0

I'm trying to run simple test using QT5 and cLion but I run in to the exit code wall... Here is my envi :
cLion 2017.2
minGw 5.0 < according to cLion
cMake 3.8.2
Qt 5.9.0

CMakeList.txt

CMakeList.txt

cmake_minimum_required(VERSION 3.8)
project(testWindotQt)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp )
add_executable(testWindotQt ${SOURCE_FILES})

if (WIN32)
    # If you compile on windows replace path to your Qt folder
    set(CMAKE_PREFIX_PATH "C:\\Qt\\5.9\\mingw53_32")#\\lib\\cmake")
endif()

find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
qt5_use_modules(testWindotQt Core Widgets Gui)
target_link_libraries(testWindotQt Qt5::Widgets Qt5::Core Qt5::Gui)

main.cpp

#include <iostream>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>

int main(int argc, char *argv[])
{
    std::cout << "Hello, World!" << std::endl;
    QApplication a(argc, argv);
    QLabel *label = new QLabel("HeyYou");
    label->show();
    return a.exec();
}

执行>
处理结束,退出代码为-1073741515(0xC0000135)

Execution >Process finished with exit code -1073741515 (0xC0000135)

any1可以帮助我解决此错误吗?
的问候
Dariusz

Can any1 help me out with this error please?RegardsDariusz

推荐答案

看看这篇文章:

基本上,您必须添加 C:QT\5.x\mingwxx_32\bin 到您的 PATH 环境变量。

Basically, you have to add C:\QT\5.x\mingwxx_32\bin to your PATH environment variable.

这篇关于cLion + Qt5-退出代码-1073741515(0xC0000135)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 20:01