GPU support error

Since I am proceeding with parallel processing using GPU, while installing CUDA, I did build the dll files in CMAKE to have GPU support. I did include all the CUDA files and now when I am trying to rebuild the solution, I am getting the following error:

OpenCV Error: No GPU support (The library is compiled without CUDA support) in EmptyFuncTable::mallocPitch, file C:\buildslave64\win64_amdocl\2_4_PackSlave-win32-vc11-shared\opencv\modules\dynamicuda\include\opencv2/dynamicuda/dynamicuda.hpp, line 126
Error: C:\buildslave64\win64_amdocl\2_4_PackSlave-win32-vc11-shared\opencv\modules\dynamicuda\include\opencv2/dynamicuda/dynamicuda.hpp:126: error: (-216) The l
ibrary is compiled without CUDA support in function EmptyFuncTable::mallocPitch

I don’t understand “buildslave64\win64_amdoc1” since the code is being compiled in 32-bit mode. Any help would be appreciated.

As noted in OpenCV documentation below:

To enable CUDA support, configure OpenCV using CMake with WITH_CUDA=ON . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built but at runtime all functions from the module throw Exception with CV_GpuNotSupported error code….”

Please re-build OpenCV, and make sure enabled CUDA support Thanks.
For more information, please refer to GPU Module Introduction — OpenCV 2.4.13.7 documentation

I’m working with Jetson TK1, on ubuntu 14.04, openCV 2.4.9.
I have got the same error. I tried setting the WITH_CUDA=ON flag, but it didn’t worked.
Can you please suggest me any solution; or if i am setting the flag in a wrong way, how to set the WITH_CUDA=ON flag.