Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. OpenCV 4.x+ requires enabled C++11 support

OpenCV 4.x+ requires enabled C++11 support

Scheduled Pinned Locked Moved Solved Installation and Deployment
8 Posts 3 Posters 3.6k 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.
  • Hugo MayorgaH Offline
    Hugo MayorgaH Offline
    Hugo Mayorga
    wrote on last edited by
    #1

    Recently I finished the installation of OpenCV 4.1.0 and I tried to execute a simple code.

    0_1557767395881_c25dd5f4-9ef8-49ec-9201-805d78b1596a-image.png

    Following this tutorial
    https://www.youtube.com/watch?v=ZOSu-2Oju-A&t=272s

    But I have this error while compiling

    0_1557767433439_d58aee3b-49b6-4511-993b-d1906bbe743d-image.png

    And my project include the line for c++11 too

    0_1557767471438_ce3ca44d-49d2-4933-b849-c7c0600c05ab-image.png

    Looking for on this forum and google I can't find a solution that works for me.

    Some advice for me?

    Thanks!

    1 Reply Last reply
    0
    • Hugo MayorgaH Offline
      Hugo MayorgaH Offline
      Hugo Mayorga
      wrote on last edited by
      #5

      Ok, Working without problems on Qt 5.12

      Thanks!

      L 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        HI,

        If you are using a recent version of Qt 5, then you don't even need to set the C++11 flag as it has been made mandatory since Qt 5.7.

        What version of Qt are you using ?
        Why are you using a compiler as old as MinGW 4.4 ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        Hugo MayorgaH 1 Reply Last reply
        1
        • SGaistS SGaist

          HI,

          If you are using a recent version of Qt 5, then you don't even need to set the C++11 flag as it has been made mandatory since Qt 5.7.

          What version of Qt are you using ?
          Why are you using a compiler as old as MinGW 4.4 ?

          Hugo MayorgaH Offline
          Hugo MayorgaH Offline
          Hugo Mayorga
          wrote on last edited by
          #3

          @SGaist
          Qt 4.8

          That could be the reason, be cause when I add the Qt mark on CMake to build OpenCV it fail with some directories

          0_1557780894322_6e8739f3-96f2-4e36-b525-38915d636076-image.png

          the reason is just i'm working in an older project that is using that compiler.

          what do you think?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Update both the compiler and Qt version. Qt 4 has reached end of life since a few years now.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • Hugo MayorgaH Offline
              Hugo MayorgaH Offline
              Hugo Mayorga
              wrote on last edited by
              #5

              Ok, Working without problems on Qt 5.12

              Thanks!

              L 1 Reply Last reply
              0
              • Hugo MayorgaH Hugo Mayorga

                Ok, Working without problems on Qt 5.12

                Thanks!

                L Offline
                L Offline
                lso70
                wrote on last edited by
                #6

                @Hugo-Mayorga you did it? i also try to build opencv on Qt 5.12,but I failed, I meet this problem i386 architecture of input file `CMakeFiles\opencv_world.dir/objects.a(vs_version.rc.obj)' is incompatible with i386:x86-64 output . Do you have any ideas? By the way ,what's your Cmake version?

                Hugo MayorgaH 1 Reply Last reply
                0
                • L lso70

                  @Hugo-Mayorga you did it? i also try to build opencv on Qt 5.12,but I failed, I meet this problem i386 architecture of input file `CMakeFiles\opencv_world.dir/objects.a(vs_version.rc.obj)' is incompatible with i386:x86-64 output . Do you have any ideas? By the way ,what's your Cmake version?

                  Hugo MayorgaH Offline
                  Hugo MayorgaH Offline
                  Hugo Mayorga
                  wrote on last edited by
                  #7

                  @lso70 My CMake is 3.14.3, I don't know what could be the problem, I just follow the video tutorial of my main post and link the g++ and gcc with the folder on Qt 5.12 version and that was all. mmm I remember some problem With DirectX/OpenGl option too, but is not the case.

                  L 1 Reply Last reply
                  0
                  • Hugo MayorgaH Hugo Mayorga

                    @lso70 My CMake is 3.14.3, I don't know what could be the problem, I just follow the video tutorial of my main post and link the g++ and gcc with the folder on Qt 5.12 version and that was all. mmm I remember some problem With DirectX/OpenGl option too, but is not the case.

                    L Offline
                    L Offline
                    lso70
                    wrote on last edited by
                    #8

                    @Hugo-Mayorga em.....I still failed,can u share your build library on git?or email?my gmail is juddgadison@gmail.com.thank u very much!

                    1 Reply Last reply
                    0

                    • Login

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