Qt Widgets application crashes after calling including an external library dependency
-
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 -
Is the needed DLL in the PATH so it can be found when starting your program?
-
@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?
-
Did you actually read and understood my post? I asked you if the needed dll is in your PATH.
-
@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.
-
@szumial Then please mark the issue as solved, thx.