Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building OpenCV 2.4.8 with CUDA 5.5

I am trying to build CUDA 5.5 with OpenCV 2.4.8 to make an x86 application.

I am running on Windows 8.1 64 bit using VS2012 C++/cli and am having crazy troubles getting my app to build.

I downloaded CUDA 5.5 Windows 8.1 64 bit for Desktop (it will not let me install 32 bit anyway).

Then, I did the following:

1) load CMake and set the target machine as Visual Studio 11 (not Win 64)

2) turn off CUDA BUILD ATTACH v RULE

3) configure and generate

4) load the ALL_BUILD project in Visual Studio specifying Win32

During the build, I get the following error:

6>CMakeFiles\cuda_compile.dir__\dynamicuda\src\cuda\Debug\cuda_compile_generated_matrix_operations.cu.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Build FAILED.

It is my understanding that you have to compile everything to your target architecture and since mine is Win32 (because of other libraries), it would seem that I have to build OpenCV to that architecture as well.

What am I doing wrong?

Any help greatly appreciated.