I have downloaded the latest OpenCV source from a github, and tried to compile it with VS2010 (with CUDA and QT support). Everything went well, except linking the opencv_world module. I'm getting lots of unresolved external symbols for symbols starting with 'gpu::', like this one:
gpumat.obj : error LNK2019: unresolved external symbol "void __cdecl cv::gpu::device::set_to_gpu<short>(struct cv::gpu::PtrStepSz<unsigned char>,short const *,int,struct CUstream_st *)" (??$set_to_gpu@F@device@gpu@cv@@YAXU?$PtrStepSz@E@12@PBFHPAUCUstream_st@@@Z) referenced in function "void __cdecl `anonymous namespace'::kernelSetCaller<short>(class cv::gpu::GpuMat &,class cv::Scalar_<double>,struct CUstream_st *)" (??$kernelSetCaller@F@?A0x4d15d89c@@YAXAAVGpuMat@gpu@cv@@V?$Scalar_@N@3@PAUCUstream_st@@@Z)
I'm guessing the problem is in the opencv_gpu module, but the build for that module succeeded. And I'm stuck there, don't know what to do next.