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. Qt Widgets application crashes after calling including an external library dependency
Forum Updated to NodeBB v4.3 + New Features

Qt Widgets application crashes after calling including an external library dependency

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 546 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
    szumial
    wrote on 2 Apr 2021, 09:42 last edited by szumial 4 Feb 2021, 09:51
    #1

    Hi! I am facing a problem with Qt Creator. After including an external library and adding the required includes in my MainWindow's header, the program will not run or allow debugging anymore. When I try to run the program, the output only shows that it unexpectedly finished. When trying to launch debug mode, I get "the CDB process terminated" message instantly. I am able to run other projects on this PC as well as the program is able to start on another computer which uses the same includes.

    The included library files and headers reside in my repository, therefore the configuration is as follows:

    # Basler Pylon dependency
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../MCInterface/deps/Basler/lib/x64/ -lPylonGUI_v6_1
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../MCInterface/deps/Basler/lib/x64/ -lPylonGUI_v6_1
    
    INCLUDEPATH += $$PWD/../MCInterface/deps/Basler/include
    DEPENDPATH += $$PWD/../MCInterface/deps/Basler/include
    
    #include "pylon/PylonIncludes.h"
    #include "pylon/BaslerUniversalInstantCamera.h"
    
    void MainWindow::on_pushButton_clicked()
    {
        Pylon::PylonInitialize();
        Pylon::PylonTerminate();
    }
    

    I have no idea why even including the headers will cause the program to crash instantly. Has anyone had an issue similar to this?

    In case this info is relevant - here is my OS/Qt configuration.
    Windows 10 64 bit
    Qt version 5.15.2
    MCVC 2019 x64

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 2 Apr 2021, 09:48 last edited by
      #2

      Is the needed DLL in the PATH so it can be found when starting your program?

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

      S 1 Reply Last reply 2 Apr 2021, 09:55
      1
      • C Christian Ehrlicher
        2 Apr 2021, 09:48

        Is the needed DLL in the PATH so it can be found when starting your program?

        S Offline
        S Offline
        szumial
        wrote on 2 Apr 2021, 09:55 last edited by
        #3

        @Christian-Ehrlicher I edited my question, since I missed the includepath definitions from my project originally. As stated in the question, the same configuration works on another computer. This library allows to read and write hardware (camera) parameters and the other PC has a compatible camera attached to it, while the machine I can't run the program on doesn't. I suspect I wouldnt be able to set/get certain parameters on this computer, but why does it fail even after adding the includes in the MainWindow header, without calling any methods?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 2 Apr 2021, 13:01 last edited by
          #4

          Did you actually read and understood my post? I asked you if the needed dll is in your PATH.

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

          S 1 Reply Last reply 2 Apr 2021, 13:34
          0
          • C Christian Ehrlicher
            2 Apr 2021, 13:01

            Did you actually read and understood my post? I asked you if the needed dll is in your PATH.

            S Offline
            S Offline
            szumial
            wrote on 2 Apr 2021, 13:34 last edited by
            #5

            @Christian-Ehrlicher thanks for highlighting! I took a look at all the settings and the PATH and found out I was using two different API versions on these PCs. Once I updated the runtime to the latest version I no longer have issues.

            C 1 Reply Last reply 2 Apr 2021, 15:29
            0
            • S szumial
              2 Apr 2021, 13:34

              @Christian-Ehrlicher thanks for highlighting! I took a look at all the settings and the PATH and found out I was using two different API versions on these PCs. Once I updated the runtime to the latest version I no longer have issues.

              C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 2 Apr 2021, 15:29 last edited by
              #6

              @szumial Then please mark the issue as solved, thx.

              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

              1/6

              2 Apr 2021, 09:42

              • Login

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