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. Error building opencv4 with qt5.15.2 tools
Qt 6.11 is out! See what's new in the release blog

Error building opencv4 with qt5.15.2 tools

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 3 Posters 1.4k 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.
  • F Offline
    F Offline
    FellowKrieger
    wrote on last edited by
    #1

    Hello, I am encoutering an error while trying to build opencv4 with qt tools.

    Here are the versions used to create the build:
    OpenCV4.8.0
    Qt5.15.2 with the tools
    gcc and g++ from mingw810_32

    Description of the error:
    in a directory set to receive the opencv build, I enter the command mingw32-make

    at 96% the build stop with the error :

    erreur_compil_opencv4_qt5_15.PNG

    I am not sure what to do with the error.
    I tried adding a couple of lines of code into the math.h file

    #ifdef _WIN64
    #define _hypot hypot
    #include <cmath>
    #endif
    

    an advice I took from this post on on stackoverflow :
    https://stackoverflow.com/questions/47735464/make-clean-not-working

    but the mingw32-make still stopped at 96% afterwards.

    Does somebody have some advice on this problem?

    Thanks.

    jsulmJ 1 Reply Last reply
    0
    • F FellowKrieger

      Hello, I am encoutering an error while trying to build opencv4 with qt tools.

      Here are the versions used to create the build:
      OpenCV4.8.0
      Qt5.15.2 with the tools
      gcc and g++ from mingw810_32

      Description of the error:
      in a directory set to receive the opencv build, I enter the command mingw32-make

      at 96% the build stop with the error :

      erreur_compil_opencv4_qt5_15.PNG

      I am not sure what to do with the error.
      I tried adding a couple of lines of code into the math.h file

      #ifdef _WIN64
      #define _hypot hypot
      #include <cmath>
      #endif
      

      an advice I took from this post on on stackoverflow :
      https://stackoverflow.com/questions/47735464/make-clean-not-working

      but the mingw32-make still stopped at 96% afterwards.

      Does somebody have some advice on this problem?

      Thanks.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @FellowKrieger What compiler version do you use and is C++11 or higher enabled?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • jsulmJ jsulm

        @FellowKrieger What compiler version do you use and is C++11 or higher enabled?

        F Offline
        F Offline
        FellowKrieger
        wrote on last edited by
        #3

        @jsulm
        compilation with gcc :
        gcc version 7.3.0

        How can I check if c++11 is enabled?

        jsulmJ 1 Reply Last reply
        0
        • F FellowKrieger

          @jsulm
          compilation with gcc :
          gcc version 7.3.0

          How can I check if c++11 is enabled?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @FellowKrieger said in Error building opencv4 with qt5.15.2 tools:

          How can I check if c++11 is enabled?

          By checking build log (compiler calls) or cmake output (assuming you're using CMake).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          F 1 Reply Last reply
          0
          • jsulmJ jsulm

            @FellowKrieger said in Error building opencv4 with qt5.15.2 tools:

            How can I check if c++11 is enabled?

            By checking build log (compiler calls) or cmake output (assuming you're using CMake).

            F Offline
            F Offline
            FellowKrieger
            wrote on last edited by
            #5

            @jsulm Yes I am using CMake version 3.28.0. But I am not very familiar with it.

            Christian EhrlicherC 1 Reply Last reply
            0
            • F FellowKrieger

              @jsulm Yes I am using CMake version 3.28.0. But I am not very familiar with it.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              set (CMAKE_CXX_STANDARD_REQUIRED 11)

              See the cmake documentation.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              F 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                set (CMAKE_CXX_STANDARD_REQUIRED 11)

                See the cmake documentation.

                F Offline
                F Offline
                FellowKrieger
                wrote on last edited by
                #7

                @Christian-Ehrlicher I cleaned everything. Compiled with the qt tool mingw810_64 (MinGW-W64-builds-4.3.5, and compiler gcc version 7.3.0).
                And It compiled until the end.

                Looks like at first, I just picked the wrong compiler. I took at first mingw810_32.

                Thanks also for the cmake instruction line. If necessary I will check this parameter.

                1 Reply Last reply
                0
                • F FellowKrieger has marked this topic as solved on

                • Login

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