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. Exit code 0xC0000135 at startup when I declare a QChart
QtWS25 Last Chance

Exit code 0xC0000135 at startup when I declare a QChart

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.6k 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.
  • E Offline
    E Offline
    Evoxz
    wrote on last edited by
    #1

    Hello everyone,

    I'm encountering some problems with my app, as I want to implement a Qt Chart in the main window. The app works fine until I declare

    chart = new QChart();
    

    in my code. When this code is present, the app compile but finishes instantly with this error code : "Process finished with exit code -1073741515 (0xC0000135)".

    Here are some parts of my CMake file (I'm working on CLion) :

    
    set(CMAKE_CXX_STANDARD 17)
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTORCC ON)
    set(CMAKE_AUTOUIC ON)
    
    set(CMAKE_PREFIX_PATH "C:/Qt/6.4.2/mingw_64/lib/cmake")
    
    find_package(Qt6 COMPONENTS
            Core
            Gui
            Widgets
            Charts
            REQUIRED)
    
    add_executable(Kite main.cpp)
    target_link_libraries(Kite
            Qt::Core
            Qt::Gui
            Qt::Widgets
            Qt::Charts
            )
    

    I double checked with Qt Maintenance Tool that QtCharts is installed for Qt 6.4.2 (the only Qt version that I have installed), and tried to uninstall/reinstall it.
    Does someone know what's wrong with my setup ?

    Thanks in advance.

    SGaistS 1 Reply Last reply
    0
    • E Evoxz

      Hello everyone,

      I'm encountering some problems with my app, as I want to implement a Qt Chart in the main window. The app works fine until I declare

      chart = new QChart();
      

      in my code. When this code is present, the app compile but finishes instantly with this error code : "Process finished with exit code -1073741515 (0xC0000135)".

      Here are some parts of my CMake file (I'm working on CLion) :

      
      set(CMAKE_CXX_STANDARD 17)
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_AUTORCC ON)
      set(CMAKE_AUTOUIC ON)
      
      set(CMAKE_PREFIX_PATH "C:/Qt/6.4.2/mingw_64/lib/cmake")
      
      find_package(Qt6 COMPONENTS
              Core
              Gui
              Widgets
              Charts
              REQUIRED)
      
      add_executable(Kite main.cpp)
      target_link_libraries(Kite
              Qt::Core
              Qt::Gui
              Qt::Widgets
              Qt::Charts
              )
      

      I double checked with Qt Maintenance Tool that QtCharts is installed for Qt 6.4.2 (the only Qt version that I have installed), and tried to uninstall/reinstall it.
      Does someone know what's wrong with my setup ?

      Thanks in advance.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you have that issue within Qt Creator ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Do you have that issue within Qt Creator ?

        E Offline
        E Offline
        Evoxz
        wrote on last edited by
        #3

        @SGaist I dit not try with Qt Creator as I don't have that IDE installed and would prefer to stick with CLion.

        SGaistS 1 Reply Last reply
        0
        • E Evoxz

          @SGaist I dit not try with Qt Creator as I don't have that IDE installed and would prefer to stick with CLion.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Since you are working with CLion, what configuration did you have to do to run your Qt application ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          E 1 Reply Last reply
          0
          • SGaistS SGaist

            Since you are working with CLion, what configuration did you have to do to run your Qt application ?

            E Offline
            E Offline
            Evoxz
            wrote on last edited by
            #5

            @SGaist I created a Qt Widgets executable project, set the Qt Cmake prefix path, selected Qt version 6, and added Qt Charts in the CMake file, that's all

            Christian EhrlicherC 1 Reply Last reply
            0
            • E Evoxz

              @SGaist I created a Qt Widgets executable project, set the Qt Cmake prefix path, selected Qt version 6, and added Qt Charts in the CMake file, that's all

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              0xC0000135 looks like you're missing a required library - I would guess the QtCharts dll is not in the PATH / CLion does not add the required path.

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

              E 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                0xC0000135 looks like you're missing a required library - I would guess the QtCharts dll is not in the PATH / CLion does not add the required path.

                E Offline
                E Offline
                Evoxz
                wrote on last edited by
                #7

                @Christian-Ehrlicher I'm wondering : aren't the dlls managed by CMake ? I checked the PATH in my configuration variables of CLion, but there is none, and basic apps (using Core, GUI or Widgets dlls) still work.

                In CMakeLists.txt, I added a line to copy Qt6Charts.dll into my application folder, at the same location that Qt6Core.dll, Qt6Gui.dll and Qt6Widgets.dll are located. As it copied Qt6Charts.dll as planned, is it still a possibility that the dll is missing ? Am I misunderstanding something with CMake ? I'm new to it.

                cmake_minimum_required(VERSION 3.24)
                project(Kite)
                
                set(CMAKE_CXX_STANDARD 17)
                set(CMAKE_AUTOMOC ON)
                set(CMAKE_AUTORCC ON)
                set(CMAKE_AUTOUIC ON)
                
                set(CMAKE_PREFIX_PATH "C:/Qt/6.4.2/mingw_64/lib/cmake")
                
                find_package(Qt6 COMPONENTS
                        Core
                        Gui
                        Widgets
                        Charts
                        REQUIRED)
                
                add_executable(Kite main.cpp)
                target_link_libraries(Kite
                        Qt::Core
                        Qt::Gui
                        Qt::Widgets
                        Qt::Charts
                        )
                
                
                if (WIN32)
                    set(DEBUG_SUFFIX)
                    if (MSVC AND CMAKE_BUILD_TYPE MATCHES "Debug")
                        set(DEBUG_SUFFIX "d")
                    endif ()
                    set(QT_INSTALL_PATH "${CMAKE_PREFIX_PATH}")
                    if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
                        set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
                        if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
                            set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
                        endif ()
                    endif ()
                    if (EXISTS "${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll")
                        add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND ${CMAKE_COMMAND} -E make_directory
                                "$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
                        add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND ${CMAKE_COMMAND} -E copy
                                "${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll"
                                "$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
                    endif ()
                    foreach (QT_LIB Core Gui Widgets Charts)
                        add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND ${CMAKE_COMMAND} -E copy
                                "${QT_INSTALL_PATH}/bin/Qt6${QT_LIB}${DEBUG_SUFFIX}.dll"
                                "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
                    endforeach (QT_LIB)
                endif ()
                
                
                Christian EhrlicherC 1 Reply Last reply
                0
                • E Evoxz

                  @Christian-Ehrlicher I'm wondering : aren't the dlls managed by CMake ? I checked the PATH in my configuration variables of CLion, but there is none, and basic apps (using Core, GUI or Widgets dlls) still work.

                  In CMakeLists.txt, I added a line to copy Qt6Charts.dll into my application folder, at the same location that Qt6Core.dll, Qt6Gui.dll and Qt6Widgets.dll are located. As it copied Qt6Charts.dll as planned, is it still a possibility that the dll is missing ? Am I misunderstanding something with CMake ? I'm new to it.

                  cmake_minimum_required(VERSION 3.24)
                  project(Kite)
                  
                  set(CMAKE_CXX_STANDARD 17)
                  set(CMAKE_AUTOMOC ON)
                  set(CMAKE_AUTORCC ON)
                  set(CMAKE_AUTOUIC ON)
                  
                  set(CMAKE_PREFIX_PATH "C:/Qt/6.4.2/mingw_64/lib/cmake")
                  
                  find_package(Qt6 COMPONENTS
                          Core
                          Gui
                          Widgets
                          Charts
                          REQUIRED)
                  
                  add_executable(Kite main.cpp)
                  target_link_libraries(Kite
                          Qt::Core
                          Qt::Gui
                          Qt::Widgets
                          Qt::Charts
                          )
                  
                  
                  if (WIN32)
                      set(DEBUG_SUFFIX)
                      if (MSVC AND CMAKE_BUILD_TYPE MATCHES "Debug")
                          set(DEBUG_SUFFIX "d")
                      endif ()
                      set(QT_INSTALL_PATH "${CMAKE_PREFIX_PATH}")
                      if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
                          set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
                          if (NOT EXISTS "${QT_INSTALL_PATH}/bin")
                              set(QT_INSTALL_PATH "${QT_INSTALL_PATH}/..")
                          endif ()
                      endif ()
                      if (EXISTS "${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll")
                          add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                  COMMAND ${CMAKE_COMMAND} -E make_directory
                                  "$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
                          add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                  COMMAND ${CMAKE_COMMAND} -E copy
                                  "${QT_INSTALL_PATH}/plugins/platforms/qwindows${DEBUG_SUFFIX}.dll"
                                  "$<TARGET_FILE_DIR:${PROJECT_NAME}>/plugins/platforms/")
                      endif ()
                      foreach (QT_LIB Core Gui Widgets Charts)
                          add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
                                  COMMAND ${CMAKE_COMMAND} -E copy
                                  "${QT_INSTALL_PATH}/bin/Qt6${QT_LIB}${DEBUG_SUFFIX}.dll"
                                  "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
                      endforeach (QT_LIB)
                  endif ()
                  
                  
                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Evoxz said in Exit code 0xC0000135 at startup when I declare a QChart:

                  I'm wondering : aren't the dlls managed by CMake

                  No, how should cmake configure your PATH env var? CMake is a build system, not a deubgger or anything else.

                  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
                  0
                  • E Evoxz has marked this topic as solved on

                  • Login

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