Building OpenCV 2.4.3 with GPU support (CUDA 5.0)

asked 2013-01-11 12:28:18 -0500

unxnut gravatar image

updated 2013-01-11 12:32:00 -0500

I am trying to build OpenCV 2.4.3 with CUDA support and getting linking errors. I am not an expert at CMake. When I hit configure in CMake GUI, I get the following error messages:

CUDA detected: 5.0
CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12; gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_20,code=compute_20
CMake Warning (dev) at cmake/OpenCVUtils.cmake:5 (find_package):
  Ignoring EXACT since no version is requested.
Call Stack (most recent call first):
  cmake/OpenCVDetectPython.cmake:34 (find_host_package)
  CMakeLists.txt:392 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

I also noticed that on Documentation, the CMake messages claim Build Documentation as NO when I have explicitly checked it to build the documentation.

When I build it in Visual Studio 2008, I get a bunch of linking errors that have something to do with gpu. The first error message looks like:

63>gpumat.obj : error LNK2019: unresolved external symbol "void __cdecl `cv::gpu::device::set_to_gpu<double>(struct cv::gpu::PtrStepSz<unsigned char>,double const` *,int,struct CUstream_st *)" (??$set_to_gpu@N@device@gpu@cv@@YAXU?$PtrStepSz@E@12@PBNHPAUCUstream_st@@@Z) referenced in function "void __cdecl `anonymous namespace'::kernelSetCaller<double>(class cv::gpu::GpuMat &,class cv::Scalar_<double>,struct CUstream_st *)" (??$kernelSetCaller@N@?A0x242c032c@@YAXAAVGpuMat@gpu@cv@@V?$Scalar_@N@3@PAUCUstream_st@@@Z)

Can someone please help?

edit retag flag offensive close merge delete