现象:
1. 系统 windows 7 64bit Ultimate 、 VS.net 2010。(但是,可能我的vs.net 是 x86的,因为我看到安装目录是C:\Program Files (x86)\Microsoft Visual Studio 10.0)
2. 按照 http://www.opencv.org.cn/index.php/VC_2010_Express%E4%B8%8B%E5%AE%89%E8%A3%85OpenCV2.4.3#.E4.B8.8B.E8.BD.BDOpenCV 中的步骤安装 OpenCV-2.4.3.exe
3. 编译时出错:LNK1112: module machine type 'x86' conflicts with target machine type 'X64'
4.后来,我在 project 右键 -> properties -> configuration properties -> Linker -> Advanced -> Target Machine 中改成 "MachineX64 (/MACHINE:X64)",编译报错:LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
原因:
vs.net 环境的版本、项目属性中的配置、选择的OpenCV 库 三者不完全一致,所以出错。
解决方法:
1.由于我的vs.net很可能是 x86 的,所以我调整使用 x86的 OpenCV库;