# Revision history [back]

### Problems building 2.4.4 64-bit vs9 with GPU/CUDA

Hey, I looked around for a while but could not find an answer to my specific problem.

I was using the binary distribution of OpenCV 2.4.4, but that is not built with GPU/CUDA support. So I am building it myself. I got the 32-bit version built OK, but I am having trouble with the 64-bit.

The InstallGuide has a cryptic statement "generate solutions using CMake, as described above. Make sure, you chose the proper generator (32-bit or 64-bit)" Well, cryptic to me at least, since I'm a newb at cmake. It took me a couple of hours of searching to discover that I needed

cmake -G 'Visual Studio 9 2008 Win64' -DWITH_CUDA=ON ...


But it seems that is not quite enough. My debug and release builds each took hours, but produced almost nothing in the end. I dove into modules/core and tried to get started building just opencv_core.vcproj, but it dies apparently because while the OpenCV code is being built 64-bit, the CUDA part is only 32 bit.

Is there some extra switch I need to give cmake to fix this?

Here's the error:

> devenv /build 'Debug|x64' opencv_core.vcproj
1>------ Build started: Project: opencv_core, Configuration: Debug x64 ------
1>.\CMakeFiles\cuda_compile.dir\src\cuda\Debug\cuda_compile_generated_matrix_operations.cu.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
...


### Problems building 2.4.4 64-bit vs9 with GPU/CUDA

Hey, I looked around for a while but could not find an answer to my specific problem.

I was using the binary distribution of OpenCV 2.4.4, but that is not built with GPU/CUDA support. So I am building it myself. I got the 32-bit version built OK, but I am having trouble with the 64-bit.

The InstallGuide has a cryptic statement "generate solutions using CMake, as described above. Make sure, you chose the proper generator (32-bit or 64-bit)" Well, cryptic to me at least, since I'm a newb at cmake. It took me a couple of hours of searching to discover that I needed

cmake -G 'Visual Studio 9 2008 Win64' -DWITH_CUDA=ON ...


But it seems that is not quite enough. My debug and release builds each took hours, but produced almost nothing in the end. I dove into modules/core and tried to get started building just opencv_core.vcproj, but it dies apparently because while the OpenCV code is being built 64-bit, the CUDA part is only 32 bit.

Is there some extra switch I need to give cmake to fix this?

Here's the error:

> devenv /build 'Debug|x64' opencv_core.vcproj
1>------ Build started: Project: opencv_core, Configuration: Debug x64 ------

V:\programs\cmake\bin\cmake.exe -D verbose:BOOL=OFF -D "CCBIN:PATH=c:\TrustedApps\Microsoft Visual Studio 9.0\VC\bin" -D build_configuration:STRING=Debug -D generated_file:STRING=V:/downloads/opencv_244/x64/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj -D generated_cubin_file:STRING=V:/downloads/opencv_244/x64/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj.cubin.txt -P V:/downloads/opencv_244/x64/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_matrix_operations.cu.obj.cmake