Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Integrating Qt and Pylon (Basler camera software)
QtWS25 Last Chance

Integrating Qt and Pylon (Basler camera software)

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
17 Posts 3 Posters 3.8k 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.
  • C Offline
    C Offline
    colinodowd
    wrote on last edited by
    #5

    @aha_1980

    I would assume so because I compiled and ran this same code (with no errors) in VS 2017

    • https://ibb.co/6WctWG0
    aha_1980A 1 Reply Last reply
    0
    • C colinodowd

      @aha_1980

      I would assume so because I compiled and ran this same code (with no errors) in VS 2017

      • https://ibb.co/6WctWG0
      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #6

      Hi @colinodowd,

      I just saw, you are using backslashes as path separator in the .pro file.

      Replace them with forward slashes, please. Especially constructs like \b (Backspace) will lead to surprising results.

      Also, make sure the path to the libs is 100% correct.

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        colinodowd
        wrote on last edited by
        #7

        Same error with all back slahses replaced as forward slashes - https://ibb.co/LR8Ft7p.

        I got the lib folder from this OpenCV download link: https://uptobox.com/3ep5xbddl9nn - this worked on the MinGW.

        I also tried the libraries from this OpenCV download (seems to be the more standard download): https://sourceforge.net/projects/opencvlibrary/

        I am now getting this error: https://ibb.co/MhzLz8p

        These are the Basler libs: https://ibb.co/t22TtPp
        I tried using both the Win32 and x64 versions in QT.

        Not sure what I am missing :/

        aha_1980A 1 Reply Last reply
        0
        • C colinodowd

          Same error with all back slahses replaced as forward slashes - https://ibb.co/LR8Ft7p.

          I got the lib folder from this OpenCV download link: https://uptobox.com/3ep5xbddl9nn - this worked on the MinGW.

          I also tried the libraries from this OpenCV download (seems to be the more standard download): https://sourceforge.net/projects/opencvlibrary/

          I am now getting this error: https://ibb.co/MhzLz8p

          These are the Basler libs: https://ibb.co/t22TtPp
          I tried using both the Win32 and x64 versions in QT.

          Not sure what I am missing :/

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by aha_1980
          #8

          @colinodowd

          Please post your .pro file as text. The LIBS 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...

          Qt has to stay free or it will die.

          C 1 Reply Last reply
          1
          • aha_1980A aha_1980

            @colinodowd

            Please post your .pro file as text. The LIBS 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...

            C Offline
            C Offline
            colinodowd
            wrote on last edited by
            #9

            @aha_1980 - here it is:

            CONFIG += c++11

            SOURCES +=
            main.cpp
            mainwindow.cpp

            HEADERS +=
            mainwindow.h

            FORMS +=
            mainwindow.ui

            INCLUDEPATH += "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

            C 1 Reply Last reply
            0
            • C colinodowd

              @aha_1980 - here it is:

              CONFIG += c++11

              SOURCES +=
              main.cpp
              mainwindow.cpp

              HEADERS +=
              mainwindow.h

              FORMS +=
              mainwindow.ui

              INCLUDEPATH += "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

              C Offline
              C Offline
              colinodowd
              wrote on last edited by
              #10

              @aha_1980 any thoughts on this?

              aha_1980A 1 Reply Last reply
              0
              • C colinodowd

                @aha_1980 any thoughts on this?

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by aha_1980
                #11

                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

                Qt has to stay free or it will die.

                C 1 Reply Last reply
                1
                • aha_1980A aha_1980

                  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

                  C Offline
                  C Offline
                  colinodowd
                  wrote on last edited by
                  #12

                  @aha_1980

                  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/YQ3FY5p

                  Where 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

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    colinodowd
                    wrote on last edited by
                    #13

                    Does anyone know what I am doing incorrectly?

                    aha_1980A J.HilkJ 2 Replies Last reply
                    0
                    • C colinodowd

                      Does anyone know what I am doing incorrectly?

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #14

                      @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

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      1
                      • C colinodowd

                        Does anyone know what I am doing incorrectly?

                        J.HilkJ Offline
                        J.HilkJ Offline
                        J.Hilk
                        Moderators
                        wrote on last edited by J.Hilk
                        #15

                        @colinodowd
                        why do you have quotation marks around your path's? I'm not sure those are interpreted correctly


                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                        Q: What's that?
                        A: It's blue light.
                        Q: What does it do?
                        A: It turns blue.

                        aha_1980A 1 Reply Last reply
                        0
                        • J.HilkJ J.Hilk

                          @colinodowd
                          why do you have quotation marks around your path's? I'm not sure those are interpreted correctly

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #16

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

                          Qt has to stay free or it will die.

                          J.HilkJ 1 Reply Last reply
                          2
                          • aha_1980A aha_1980

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

                            J.HilkJ Offline
                            J.HilkJ Offline
                            J.Hilk
                            Moderators
                            wrote on last edited by
                            #17

                            @aha_1980
                            oh, I totally missed that! I try to avoid special chars - that includes spaces - in all paths when possible.


                            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                            Q: What's that?
                            A: It's blue light.
                            Q: What does it do?
                            A: It turns blue.

                            1 Reply Last reply
                            2

                            • Login

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