Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help compiling OpenCV

Help compiling OpenCV

Scheduled Pinned Locked Moved C / C++ / MFC
helphtmlasp-netquestionannouncement
6 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • _ Offline
    _ Offline
    _Flaviu
    wrote on last edited by
    #1

    Hi. I need to use OpenCV in some project, and I noticed that I have to compile myself OpenCV library. So, I have downloaded the latest version from here: Releases - OpenCV library[^] and I have generated the project file for VS2008, with CMake (using Windows 1064bit). All of these steps have been completed without any error. The problem begin when I have tried to compile the library itself ... I got a lot of errors:

    ...
    ...
    45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(356) : error C2065: 'uint_fast64_t' : undeclared identifier
    45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(358) : error C2065: 'uint_fast64_t' : undeclared identifier
    45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(393) : error C2146: syntax error : missing ';' before identifier 'cvRound64'
    ...
    ...

    Of course, I have read the tutorials about compiling OpenCV, seem to be ok how I get the steps ... but the errors persist ... if you have some experience with OpenCV, could you help me ? Thank you.

    V J 2 Replies Last reply
    0
    • _ _Flaviu

      Hi. I need to use OpenCV in some project, and I noticed that I have to compile myself OpenCV library. So, I have downloaded the latest version from here: Releases - OpenCV library[^] and I have generated the project file for VS2008, with CMake (using Windows 1064bit). All of these steps have been completed without any error. The problem begin when I have tried to compile the library itself ... I got a lot of errors:

      ...
      ...
      45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(356) : error C2065: 'uint_fast64_t' : undeclared identifier
      45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(358) : error C2065: 'uint_fast64_t' : undeclared identifier
      45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(393) : error C2146: syntax error : missing ';' before identifier 'cvRound64'
      ...
      ...

      Of course, I have read the tutorials about compiling OpenCV, seem to be ok how I get the steps ... but the errors persist ... if you have some experience with OpenCV, could you help me ? Thank you.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Did you include the ?

      _ 2 Replies Last reply
      0
      • V Victor Nijegorodov

        Did you include the ?

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        Where should I insert this header ?

        V 1 Reply Last reply
        0
        • V Victor Nijegorodov

          Did you include the ?

          _ Offline
          _ Offline
          _Flaviu
          wrote on last edited by
          #4

          For the moment I am compiling the OpenCV library, and I didn't edit any source code. Perhaps I put too less information regarding the errors:

          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(189) : error C2065: 'uint_fast32_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(189) : error C2146: syntax error : missing ';' before identifier 'vv'
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(189) : error C2065: 'vv' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(190) : error C2065: 'vv' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(314) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(321) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(331) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(331) : error C2146: syntax error : missing ';' before identifier 'vv'
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(331) : error C2065: 'vv' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(331) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(332) : error C2065: 'vv' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(348) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(352) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(354) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(356) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(358) : error C2065: 'uint_fast64_t' : undeclared identifier
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(393) : error C2146: syntax error : missing ';' before identifier 'cvRound64'
          1>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(393) : error C443

          1 Reply Last reply
          0
          • _ _Flaviu

            Where should I insert this header ?

            V Offline
            V Offline
            Victor Nijegorodov
            wrote on last edited by
            #5

            If you are using precompiled header then in stdafx.h. Otherwise - at the begin of the .hpp file that needs these type definitions (uint_fast64_t and so on)

            1 Reply Last reply
            0
            • _ _Flaviu

              Hi. I need to use OpenCV in some project, and I noticed that I have to compile myself OpenCV library. So, I have downloaded the latest version from here: Releases - OpenCV library[^] and I have generated the project file for VS2008, with CMake (using Windows 1064bit). All of these steps have been completed without any error. The problem begin when I have tried to compile the library itself ... I got a lot of errors:

              ...
              ...
              45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(356) : error C2065: 'uint_fast64_t' : undeclared identifier
              45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(358) : error C2065: 'uint_fast64_t' : undeclared identifier
              45>C:\Flaviu\opencv\sources\modules\core\include\opencv2/core/softfloat.hpp(393) : error C2146: syntax error : missing ';' before identifier 'cvRound64'
              ...
              ...

              Of course, I have read the tutorials about compiling OpenCV, seem to be ok how I get the steps ... but the errors persist ... if you have some experience with OpenCV, could you help me ? Thank you.

              J Offline
              J Offline
              Jochen Arndt
              wrote on last edited by
              #6

              I have no experience with OpenCV but the reason for those errors is obvious.

              Quote:

              I have generated the project file for VS2008

              The int_fast and int_least types has been introduced with C++11 and are supported by Visual Studio since VS 2015 (see Standard Types[^]). You might define them yourself as

              typedef uint64_t uint_fast64_t;

              You might also check if using C++11 is set somewhere in the OpenCV make file and disable that in the hope that the types are then defined somewhere.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups