Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error Building OpenCV 3.2 with VS2012/WIN10

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>  alloc.cpp
13>  arithm.cpp
13>  array.cpp
13>  command_line_parser.cpp
13>  conjugate_gradient.cpp
13>  convert.cpp
13>  copy.cpp
13>  cuda_gpu_mat.cpp
13>  cuda_host_mem.cpp
13>  cuda_info.cpp
13>  cuda_stream.cpp
13>  datastructs.cpp
13>  directx.cpp
13>  downhill_simplex.cpp
13>  dxt.cpp
13>  gl_core_3_1.cpp
13>  glob.cpp
13>  hal_internal.cpp
13>  kmeans.cpp
13>  lapack.cpp
13>  lda.cpp
13>  lpsolver.cpp
13>  mathfuncs.cpp
13>  mathfuncs_core.dispatch.cpp
13>  matmul.cpp
13>  matop.cpp
13>  matrix.cpp
13>  matrix_decomp.cpp
13>  merge.cpp
13>  ocl.cpp
13>  opencl_clamdblas.cpp
13>  opencl_clamdfft.cpp
13>  opencl_core.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>  parallel.cpp
13>  parallel_pthreads.cpp
13>  pca.cpp
13>  persistence.cpp
13>  rand.cpp 
13>  split.cpp
13>  stat.cpp
13>  stl.cpp
13>  system.cpp
13>  tables.cpp
13>  types.cpp
13>  umatrix.cpp
13>  va_intel.cpp
13>  opencl_kernels_core.cpp
14>------ Rebuild All started: Project: opencv_imgproc, Configuration: Debug x64 ------

Is there something I should be selecting/deselecting here?

Thanks for any help.

Error Building OpenCV 3.2 with VS2012/WIN10VS2012/WIN10 (Updated)

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>  alloc.cpp
13>  arithm.cpp
13>  array.cpp
13>  command_line_parser.cpp
13>  conjugate_gradient.cpp
13>  convert.cpp
13>  copy.cpp
13>  cuda_gpu_mat.cpp
13>  cuda_host_mem.cpp
13>  cuda_info.cpp
13>  cuda_stream.cpp
13>  datastructs.cpp
13>  directx.cpp
13>  downhill_simplex.cpp
13>  dxt.cpp
13>  gl_core_3_1.cpp
13>  glob.cpp
13>  hal_internal.cpp
13>  kmeans.cpp
13>  lapack.cpp
13>  lda.cpp
13>  lpsolver.cpp
13>  mathfuncs.cpp
13>  mathfuncs_core.dispatch.cpp
13>  matmul.cpp
13>  matop.cpp
13>  matrix.cpp
13>  matrix_decomp.cpp
13>  merge.cpp
13>  ocl.cpp
13>  opencl_clamdblas.cpp
13>  opencl_clamdfft.cpp
13>  opencl_core.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>  parallel.cpp
13>  parallel_pthreads.cpp
13>  pca.cpp
13>  persistence.cpp
13>  rand.cpp 
13>  split.cpp
13>  stat.cpp
13>  stl.cpp
13>  system.cpp
13>  tables.cpp
13>  types.cpp
13>  umatrix.cpp
...
13>  va_intel.cpp
13>  opencl_kernels_core.cpp
14>------ Rebuild All started: Project: opencv_imgproc, Configuration: Debug x64 ------

Is there something I 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 selecting/deselecting here?

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.