Error Building OpenCV 3.2 with VS2012/WIN10 (Updated) [closed]

asked 2017-05-24 11:48:05 -0600

jpistorino gravatar image

updated 2017-05-24 13:10:34 -0600

I am trying to build OpenCV 3.2 with VS2012 on a Win10 64 bit machine also using CUDA 8.0. I am using CMake 3.8.1.

I downloaded the latest version of both OpenCV 3.2 and contrib from GitHub. Then, I set the EXTRA_MODULES_PATH to where contrib is stored. I also deselected various things that did not appear relevant. I then configured and generated and do not think that I am getting any CMake errors.

When I compile the ALL_BUILD project, 12 projects succeed and 58 fail.

The first error listed shows:

13>  Building Custom Rule C:/OpenCV/opencv-3.2.0/modules/core/CMakeLists.txt
13>  CMake does not need to re-run because C:/OpenCV/opencv/build/modules/core/CMakeFiles/generate.stamp is up-to-date.
13>  Generating opencl_kernels_core.cpp, opencl_kernels_core.hpp
13>  opencv_core_pch.cpp
13>  algorithm.cpp
...
13>  opengl.cpp
13>  out.cpp
13>C:\OpenCV\opencv-3.2.0\modules\core\src\out.cpp(106): error C3861: 'snprintf': identifier not found
13>  ovx.cpp
...
13>  va_intel.cpp
13>  opencl_kernels_core.cpp
14>------ Rebuild All started: Project: opencv_imgproc, Configuration: Debug x64 ------

In light of berak's comment, I deleted all of OpenCV master and reloaded from GitHub. Now CMake gives the following errors when I try and configure. I have deleted CMakceCache to make sure that is not an issue.

The C compiler identification is MSVC 17.0.61030.0
The CXX compiler identification is MSVC 17.0.61030.0
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:7 (ocv_glob_modules):
  Unknown CMake command "ocv_glob_modules".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/OpenCV/opencv/build/CMakeFiles/CMakeOutput.log".

Thanks again for any help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-02 01:18:13.694391

Comments

you'll want to check, if this recent pr works for you

berak gravatar imageberak ( 2017-05-24 12:01:30 -0600 )edit

Sorry for being so slow. Is it the case that this fix has already been added to the master and that I just need to download it again or are you suggesting that I edit the file to include the cv_snprintf definition? Also, how does something like this happen? I thought the buildfarm would compile everything against the target platforms and not release until it passes. Thanks for your help.

jpistorino gravatar imagejpistorino ( 2017-05-24 12:27:03 -0600 )edit

just get latest opencv master branch, and try again.

(the buildfarm covers a lot of cases, but not vs2012, specifically)

berak gravatar imageberak ( 2017-05-24 12:29:42 -0600 )edit

Berak, Could I trouble you for any guidance here? Thanks.

jpistorino gravatar imagejpistorino ( 2017-05-25 12:02:00 -0600 )edit

sorry, but i'm lost at it, can't reproduce your problem.

berak gravatar imageberak ( 2017-05-25 12:04:37 -0600 )edit

OK Thanks

jpistorino gravatar imagejpistorino ( 2017-05-25 12:10:45 -0600 )edit