2

I want to build OpenCV 3.2 for Visual Studio 2015 in Windows 10 with Cuda support. So, I configured it using CMake (see configuration file here). Cuda is installed and the path variable is set correctly. However, when building the OpenCV.sln solution (debug, x64), I get in total 36 (3 different) errors, all referring to the cuda module:

C2610 C2535 C2382

Here one example per error code (Code, Description, Project File, Line):

Error C2610 'std::tuple::tuple(const std::tuple &)': is not a special member function which can be defaulted (compiling source file C:\Users\user\down\opencv3.2\opencv-src\modules\cudawarping\perf\perf_warping.cpp) opencv_perf_cudawarping C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple 607

Error C2535 'std::tuple &std::tuple::operator =(const std::tuple &)': member function already defined or declared (compiling source file C:\Users\user\down\opencv3.2\opencv-src\modules\cudawarping\perf\perf_warping.cpp) opencv_perf_cudawarping C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\tuple 756

Error C2382 'std::tuple::operator =': redefinition; different exception specifications (compiling source file C:\Users\user\down\opencv3.2\opencv-src\modules\cudawarping\perf\perf_warping.cpp) opencv_perf_cudawarping C:\Users\user\down\opencv3.2\opencv-src\modules\ts\include\opencv2\ts\cuda_perf.hpp 76

EDIT:

This is reported as an issue for OpenCV 3.2.

Here is a good way to bypass the problem, posted by ThorbjornSomod (see issue):

I actually got it to work both on my laptop and my desktop (GTX960M and GTX970 respectively) running with OpenCV 3.2 and the latest version of CUDA 8.0 for Win10 in Visual Studio 15 Community! What I did was to enable WITH_CUBLAS aswell as WITH_CUDA. I also turned off BUILD_PERF_TESTS and BUILD_TESTS. The configuration was built using the Visual Studio 14 2015 C++ compiler.

black
  • 1,151
  • 3
  • 18
  • 46
  • This s not a CUDA question, it is an OpenCV problem which has been reported several times to their bug tracker, if you bother to search for it. I am removing the CUDA tag, please do not re-add it. – talonmies Feb 08 '17 at 20:24
  • @talonmies I have seen these bug reports - but these are referring to previous versions of OpenCV 3 - and these errors had been fixed now. – black Feb 08 '17 at 20:27
  • @black I have encountered the same issue. To solve it, should BLAS be installed first or just check the WITH_BLAS flag? – jwm Jan 24 '18 at 18:42

0 Answers0