Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Qt with CLion on Windows
Forum Updated to NodeBB v4.3 + New Features

Using Qt with CLion on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
clion-idewindows 10mingw
3 Posts 2 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam37
    wrote on 27 Dec 2019, 15:29 last edited by
    #1

    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:

    Capture.PNG

    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?

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 27 Dec 2019, 15:48 last edited by
      #2

      @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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • S Offline
        S Offline
        Sam37
        wrote on 30 Dec 2019, 17:31 last edited by
        #3

        Adding "[...]/mingw73_32/bin" to PATH worked! Thank you

        1 Reply Last reply
        0

        1/3

        27 Dec 2019, 15:29

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved