Integrating Qt and Pylon (Basler camera software)
-
Please post your
.pro
file as text. TheLIBS
lines are incorrect.The syntax is:
LIBS += -L/path/to/library -llibrary1 -llibrary2 ...
Edit: Seems you changed that in the meantime, because it was already better in earlier posts...
-
@aha_1980 - here it is:
CONFIG += c++11
SOURCES +=
main.cpp
mainwindow.cppHEADERS +=
mainwindow.hFORMS +=
mainwindow.uiINCLUDEPATH += "C:/Program Files/Basler/pylon 5/Development/include"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/GCBase_MD_VC141_v3_1_Basler_pylon.lib"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/GenApi_MD_VC141_v3_1_Basler_pylon.lib"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/PylonBase_v5_2.lib"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/PylonC.lib"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/PylonGUI_v5_2.lib"
LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32/PylonUtility_v5_2.lib"INCLUDEPATH += C://Users//colin.odowd//Downloads//opencv//build//include
LIBS += -LC://Users//colin.odowd//Downloads//OpenCV-2.4.9//build-qt//lib
-lopencv_calib3d249d
-lopencv_contrib249d
-lopencv_core249d
-lopencv_features2d249d
-lopencv_flann249d
-lopencv_gpu249d
-lopencv_highgui249d
-lopencv_imgproc249d
-lopencv_legacy249d
-lopencv_ml249d
-lopencv_nonfree249d
-lopencv_objdetect249d
-lopencv_ocl249d
-lopencv_photo249d
-lopencv_stitching249d
-lopencv_superres249d
-lopencv_ts249d
-lopencv_video249d
-lopencv_videostab249d -
@aha_1980 any thoughts on this?
-
Hi @colinodowd,
your file got a bit messed up here. I'll post the relevant part edited like it should work:
INCLUDEPATH += "C:/Program Files/Basler/pylon 5/Development/include" LIBS += -L"C:/Program Files/Basler/pylon 5/Development/lib/Win32" \ -lGCBase_MD_VC141_v3_1_Basler_pylon.lib \ -lGenApi_MD_VC141_v3_1_Basler_pylon.lib \ -lPylonBase_v5_2.lib \ -lPylonC.lib \ -lPylonGUI_v5_2.lib \ -lPylonUtility_v5_2.lib INCLUDEPATH += C:/Users/colin.odowd/Downloads/opencv/build/include LIBS += -LC:/Users/colin.odowd/Downloads/OpenCV-2.4.9/build-qt/lib \ -lopencv_calib3d249d \ -lopencv_contrib249d \ -lopencv_core249d \ -lopencv_features2d249d \ -lopencv_flann249d \ -lopencv_gpu249d \ -lopencv_highgui249d \ -lopencv_imgproc249d \ -lopencv_legacy249d \ -lopencv_ml249d \ -lopencv_nonfree249d \ -lopencv_objdetect249d \ -lopencv_ocl249d \ -lopencv_photo249d \ -lopencv_stitching249d \ -lopencv_superres249d \ -lopencv_ts249d \ -lopencv_video249d \ -lopencv_videostab249d
It seems, the opencv libs are debug versions, which is marked by the trailing
d
, like "opencv_ts249d". It may therefore be, that you cannot use them with a release build program.Do you have libraries without trailing d?
Regards
-
That folder only had libs with 'd' at the end.
Where I downloaded from: https://uptobox.com/3ep5xbddl9nn - this worked on the MinGW.
Ran your refined INCLUDE and LIB in both release and debug mode and got this error message:
https://ibb.co/YQ3FY5pWhere I downloaded from: https://sourceforge.net/projects/opencvlibrary/
I then tried using a differnet OpenCV folder with a library that did not have a 'd' at the end and got this error message:
https://ibb.co/gZGrwTQ -
Does anyone know what I am doing incorrectly?
-
@colinodowd one backslash got lost in my snippet, I added it.
And once again: on Windows all libraries have to fit your compiler. You cannot use MSVC libs with MinGW or vice versa. So make sure OpenCV is compatible to what you're using.
Regards
-
@colinodowd
why do you have quotation marks around your path's? I'm not sure those are interpreted correctly -
@j-hilk said in Integrating Qt and Pylon (Basler camera software):
why do you have quotation marks around your path's? I'm not sure those are interpreted correctly
Because when you have spaces in the path, then you have to add the quotes. Otherwise it will fail to parse the path...