简体   繁体   中英

LNK1112 in building from scratch of opencv

Here is my goal: being able to have the opencv library in x86 (32bits) using VisualStudio

Here is my problem: by following this tutorial 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/

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.

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".

Nevertheless, I didn't compile either with the x64 or x86 solution platform, but only 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. Since I didn't need opencv for python I just reconfigured the project with cmake, generated it, and it worked with no error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM