CUDA/GPU not being detected after building opencv 2.4.10

I have CUDA 6.5 installed on my Win 8.1 64 bit system with 2GB GeForce GTX 860M. I installed Opencv 2.4.10 using Visual Studio 2013. But whenever I run any GPU based program I get this error “OpenCV Error: No GPU support (The library is compiled without CUDA support)”.

I also have a query on stackoverflow which has more detail.

The issue that has been identified is about a missing package “dynamicuda” but I am not sure about this. Please help in correcting this issue.