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

Error building opencv4 with qt5.15.2 tools

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 3 Posters 568 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 13 Nov 2023, 22:48 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.

    J 1 Reply Last reply 14 Nov 2023, 06:37
    0
    • F FellowKrieger
      13 Nov 2023, 22:48

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 14 Nov 2023, 06:37 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 14 Nov 2023, 14:04
      0
      • J jsulm
        14 Nov 2023, 06:37

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

        F Offline
        F Offline
        FellowKrieger
        wrote on 14 Nov 2023, 14:04 last edited by
        #3

        @jsulm
        compilation with gcc :
        gcc version 7.3.0

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

        J 1 Reply Last reply 14 Nov 2023, 14:12
        0
        • F FellowKrieger
          14 Nov 2023, 14:04

          @jsulm
          compilation with gcc :
          gcc version 7.3.0

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

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 14 Nov 2023, 14:12 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 14 Nov 2023, 17:03
          0
          • J jsulm
            14 Nov 2023, 14:12

            @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 14 Nov 2023, 17:03 last edited by
            #5

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

            C 1 Reply Last reply 14 Nov 2023, 17:05
            0
            • F FellowKrieger
              14 Nov 2023, 17:03

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

              C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 14 Nov 2023, 17:05 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 14 Nov 2023, 18:17
              0
              • C Christian Ehrlicher
                14 Nov 2023, 17:05

                set (CMAKE_CXX_STANDARD_REQUIRED 11)

                See the cmake documentation.

                F Offline
                F Offline
                FellowKrieger
                wrote on 14 Nov 2023, 18:17 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 14 Nov 2023, 21:06

                1/7

                13 Nov 2023, 22:48

                • Login

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