Ask Your Question

Revision history [back]

Build OpenCV source code with CUDA support

I am building opencv source code according to the link. https://hemprasad.wordpress.com/2014/06/20/opencv-installation-in-windows/

I created Visual Studio projects with CMake.

I have the errors as following.

Error 1 error LNK2001: unresolved external symbol "public: static class cv::cuda::GpuMat::Allocator * __cdecl cv::cuda::GpuMat::defaultAllocator(void)" (?defaultAllocator@GpuMat@cuda@cv@@SAPEAVAllocator@123@XZ) G:\Study\OpenCV\cuda\OpenCV\build\modules\world\frame_source.cpp.obj opencv_world

While debugging, I found that VS did not compile *.cu files at all.

In this reason, there are a lot of linkage errors.

Who can help me?

Thanks.