Monday, July 8, 2013

UPDATE: CUDA 5.5 + OpenCV 2.4.9 + Visual Studio 2012

Successfully compiled!!

After several attempts to compile the latest unstable release of OPENCV from git source, it finally works, but you need to do a couple of tweeks to get it to work.

Fix #1: As mentioned by   Vladislav Vinogradov on http://code.opencv.org/issues/3135
setting CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE  cmake variable to off gets rid of those cuda compile related errors.

Fix #2:
"OPENCV_ROOT"\modules\gpuarithm\test\test_element_operations.cpp

You need to add #include <functional> as without it you will get compile errors like this:
error: std::greater is an undeclared variable.

Note: Following is the CMAKE param check list I used to successfully compile

Ungrouped Entries

BUILD options: Uncheck BUILD_DOCS and BUILD_EXAMPLES

CUDA OPTIONS: Uncheck CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE and take note of other red boxes


WITH OPTIONS: Add  WITH_CUBLAS, WITH_OPENGL, WITH_TBB

In the end you should have only one error for debug mode and none under release mode compile.
As usual run INSTALL under CMakeTargets to put libs and include files in one convenient area. (Make sure you compile both debug and release before running this)