Using Qt with CLion on Windows
-
Hi,
I am trying to use Qt with CLion on Windows and I have installed and setup the MinGW 7.3 32bit compiler. Building the project with CLion works just fine, but when I try to run it I get the following error:
Process finished with exit code -1073741515 (0xC0000135)
When I double click the executable file created by CLion, I get this error dialog:
And this is my CMakeLists.txt file:
cmake_minimum_required(VERSION 3.10) project(DiffCode) set(CMAKE_CXX_STANDARD 14) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.14.0\\5.14.0\\mingw73_32") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp MainWindow.cpp MainWindow.h) set(EXTRA_FILES MainWindow.ui DiffCode_en_GB.ts) add_executable(DiffCode ${SOURCE_FILES} ${EXTRA_FILES}) find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets) target_link_libraries(DiffCode Qt5::Core Qt5::Gui Qt5::Widgets)
When I open the project in Qt Creator, I can build and run it without any problems.
I tried the same thing on my Mac once and it worked, I am just struggeling to get it working on Windows.
Does anyone have an idea? -
@Sam37 said in Using Qt with CLion on Windows:
When I open the project in Qt Creator, I can build and run it without any problems.
Because qtcreator properly sets up PATH so the correct Qt dlls are found.