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)
Forum Updated to NodeBB v4.3 + New Features

Integrating Qt and Pylon (Basler camera software)

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
17 Posts 3 Posters 4.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 11 Aug 2019, 09:23 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
    A 1 Reply Last reply 11 Aug 2019, 09:44
    0
    • C colinodowd
      11 Aug 2019, 09:23

      @aha_1980

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

      • https://ibb.co/6WctWG0
      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 11 Aug 2019, 09:44 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 11 Aug 2019, 10:28 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 :/

        A 1 Reply Last reply 11 Aug 2019, 11:01
        0
        • C colinodowd
          11 Aug 2019, 10:28

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

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 11 Aug 2019, 11:01 last edited by aha_1980 8 Nov 2019, 11:02
          #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 11 Aug 2019, 13:53
          1
          • A aha_1980
            11 Aug 2019, 11:01

            @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 11 Aug 2019, 13:53 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 11 Aug 2019, 18:23
            0
            • C colinodowd
              11 Aug 2019, 13:53

              @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 11 Aug 2019, 18:23 last edited by
              #10

              @aha_1980 any thoughts on this?

              A 1 Reply Last reply 11 Aug 2019, 19:07
              0
              • C colinodowd
                11 Aug 2019, 18:23

                @aha_1980 any thoughts on this?

                A Offline
                A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on 11 Aug 2019, 19:07 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 11 Aug 2019, 20:41
                1
                • A aha_1980
                  11 Aug 2019, 19:07

                  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 11 Aug 2019, 20:41 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 12 Aug 2019, 21:27 last edited by
                    #13

                    Does anyone know what I am doing incorrectly?

                    A J 2 Replies Last reply 13 Aug 2019, 04:47
                    0
                    • C colinodowd
                      12 Aug 2019, 21:27

                      Does anyone know what I am doing incorrectly?

                      A Offline
                      A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on 13 Aug 2019, 04:47 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
                        12 Aug 2019, 21:27

                        Does anyone know what I am doing incorrectly?

                        J Offline
                        J Offline
                        J.Hilk
                        Moderators
                        wrote on 13 Aug 2019, 05:33 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.

                        A 1 Reply Last reply 13 Aug 2019, 06:58
                        0
                        • J J.Hilk
                          13 Aug 2019, 05:33

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

                          A Offline
                          A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on 13 Aug 2019, 06:58 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 1 Reply Last reply 13 Aug 2019, 07:00
                          2
                          • A aha_1980
                            13 Aug 2019, 06:58

                            @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 Offline
                            J Offline
                            J.Hilk
                            Moderators
                            wrote on 13 Aug 2019, 07:00 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

                            14/17

                            13 Aug 2019, 04:47

                            • Login

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