Building v2.4.8 32-bit with VS2012 Express uses link path to x64

asked 2014-03-03 18:04:57 -0500

pixelhead gravatar image

Hi -

OpenCV is a great library and I wanted to just pass along some info I found trying to build OpenCV 2.4.8 using VS2012 Express with CUDA 5.5. I tried building x64 but it seems CUDA 5.5 doesn't support 64-bit for VS2012 Express (nvcc did not recognize the visual studio version).

So I reran cmake using the 32-bit Visual Studio 11 Generator and unchecked CUDA_64_BIT_DEVICE_CODE to use the Win32 CUDA runtime. However, the link paths to the CUDA libraries still remained at the lib/x64/ paths. I manually edited them to point to lib/Win32 and succesfully compiled.

Poking around the FindCUDA.cmake file, it appears the 'cuda_find_library_local_first_with_path_ext' macro (line 799) doesn't take into account the CUDA_64_BIT_DEVICE_CODE flag when using 'find_library'.

Hope this helps.

edit retag flag offensive close merge delete