Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Linker error (x86 - x64)

Hi, I'm trying to compile an OpenCV application on windows for the very first time and, after all sunday afternoon looking in msdn, stackoverflow, this site for a solution my problem is still there. Let's explain it. I followed step by step the guide of the windows installation (including opencv version, 2.4.3), i correctly set the OPENCV_DIR variable and added libs and bin to my visual c++ 2010 express. Then pasted the example code found in the "how to build applications with openCV inside Microsoft Visual Studio" and had this horrible problem: il tipo di computer del modulo 'X86' è in conflitto con il tipo di computer di destinazione 'x64' (my visual studio is in italian, but is the "module machine type 'type1' conflicts with target machine type 'type2'" error described in msdn.microsoft.com)

Whow, that's easy! after 4 hours spent surfing the internet for this solution I got that i have to change the "linker->advanced->target machine" field to x86!

Rebuild, Build, Clean, Build, Rebuild, Clean, Rebuild. Nothing, if I change the target machine to x86 i get this error: 1>opencv_highgui243d.lib(opencv_highgui243d.dll) : fatal error LNK1112: il tipo di computer del modulo 'x64' è in conflitto con il tipo di computer di destinazione 'X86'

Ok.... now, tanke a breath, what is going on here? is my pc x86? is x64? (since this morning i was sure it is x64, and the windows panel agree to me) but vc++ 2010 doesn't.

Thanks in advance for any help and sorry if there are some big mistakes.... (I'm a little bit frustrated)