[英]LNK1112 in building from scratch of opencv
Here is my goal: being able to have the opencv library in x86 (32bits) using VisualStudio 这是我的目标:能够使用VisualStudio在x86(32位)中使用opencv库
Here is my problem: by following this tutorial http://dogfeatherdesign.com/opencv-3-0-microsoft-visual-studio-2015-cmake-and-c/ 这是我的问题:按照本教程http://dogfeatherdesign.com/opencv-3-0-microsoft-visual-studio-2015-cmake-and-c/
or this one http://amin-ahmadi.com/2015/12/04/how-to-build-opencv-from-source-for-vc14/ 或这个http://amin-ahmadi.com/2015/12/04/how-to-build-opencv-from-source-for-vc14/
even with this version http://amin-ahmadi.com/2015/12/22/how-to-build-opencv-310-msvc2010-vc10-x86/ (which take care of the fact that new versions of OpenCV don't have precompiled libraries for the x86) I had to build it from scratch. 即使使用此版本http://amin-ahmadi.com/2015/12/22/how-to-build-opencv-310-msvc2010-vc10-x86/ (也要注意新版本的OpenCV不会没有为x86预编译的库)我不得不从头开始构建它。
And in each case, after having successfully generated a VS file from opencv, the compiler (after 5minutes of compilation) tells me the following error: "LNK112 module machine type x64 conflicts with target machine type x86".
并且在每种情况下,从opencv成功生成VS文件之后,编译器(在5
"LNK112 module machine type x64 conflicts with target machine type x86".
的编译后)都会告诉我以下错误: "LNK112 module machine type x64 conflicts with target machine type x86".
Nevertheless, I didn't compile either with the x64 or x86 solution platform, but only Win32. 但是,我没有使用x64或x86解决方案平台进行编译,而仅使用Win32。 Hope to have given enough details, thank for the help!
希望给出足够的细节,谢谢帮助! :)
:)
I actually fond the answer: after having installed python 64 bits, cmake linked this library automatically, which was the cause of the error. 我实际上很喜欢这个答案:在安装python 64位之后,cmake自动链接了这个库,这就是错误的原因。 Since I didn't need opencv for python I just reconfigured the project with cmake, generated it, and it worked with no error.
因为我不需要python的opencv,所以我只用cmake重新配置了项目,生成了它,并且没有错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.