简体   繁体   English

从零开始在建筑物中使用LNK1112

[英]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.

相关问题 Nuitka编译python时出现致命错误LNK1112 - fatal error LNK1112 when nuitka compile python LNK1112:模块机器类型'x64'与目标机器类型'x86'发生冲突-OpenCV构建 - LNK1112: module machine type 'x64' conflicts with target machine type 'x86' - opencv build 传感器模拟器构建失败,出现 LNK1112 错误 - Sensor simulator build fails with LNK1112 error 使用Visual Studio构建和调试Chromium并给出错误:错误LNK1112:模块机器类型“ x64”与目标机器类型“ X86”冲突 - Building and debugging Chromium using visual studio giving error : error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' 将 x86 项目转换为 x64 时如何解决错误 LNK1112? - How to solve error LNK1112 when converting a x86 project to x64? 链接问题:致命错误 LNK1112:模块机器类型“x64”与目标机器类型“X86”冲突 - linking problem: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' SFML 2.5.1 错误 LNK1112 模块机器类型“x86”与目标机器类型“x64”冲突 - SFML 2.5.1 Error LNK1112 module machine type 'x86' conflicts with target machine type 'x64' 使用Visual Studio 2008构建OpenCV应用程序并从另一台计算机运行它 - Building an OpenCV application with Visual Studio 2008 and running it from another computer 建立OpenCV时发生错误 - Error in building OpenCV 在visual studio中构建Qt项目时出现LNK2019错误 - LNK2019 error when building a Qt project in visual studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM