Opencv_GPU compile error Error in comipling opencv 2.3 with cuda


Im trying to compile opencv2.3 with CUDA, and constantly get the following error:

Error 54 error LNK2001: unresolved external symbol “void __cdecl cv::gpu::error(char const *,char const *,int,char const *)” (?error@gpu@cv@@YAXPBD0H0@Z) opencv_gpu
And about 20 similar errors.

How can i solve it?


are you trying to use OpenCV in a .cu file? Or more specifically, are you #include’ing OpenCV headers into a .cu file?

I met the same problem.

I guess you used the Cmake to build the opencv2.3 and cuda 4.0. Peahaps you can use the compiled library in the website:

Though I failed with this method, you can have a try.

If you solve the problems, please share~ Good luck.