Article From:https://www.cnblogs.com/littlepear/p/9971621.html

For general installation steps, this blog gives a detailed installation of OpenCV. Don’t drop a step, it shouldn’t be a problem.

The main pits areBoost

For some reason, my computer set-upboost_1_62_0-msvc-14.0-64,I tried to write environment variables, and I can’t write them with VS2015 tools.

Later replacedboost_1_64_0-msvc-14.0-64,After stepping on some more pits, it’s OK.

Here we should pay attention to two points:

1.When downloading, there are two kinds of zip and exe. Zip needs to compile by itself. The libraries in exe are compiled and called this name.lib64-msvc-14.0,I don’t call it / stages / libs.

2.When compiling zip decompressed source code, bootstrap. bat and bjam. exe are compiled under the VS2015 toolkit.

Static compilation commandsBjam install stage--toolset=msvc-14.0 --stagedir="F:\boost_1_64_0" link=static runtime-link=static threading=multi address-model=64 debug release
Dynamic compilation commandsBjam install stage--toolset=msvc-14.0 --stagedir="F:\boost_1_64_0" link=static runtime-link=shared threading=multi address-model=64 debug release

3.Notice the corresponding version of MSVC after boost.

MSVC-7.1  (Visual Studio 2003)
MSVC-8.0  (Visual Studio 2005)
MSVC-9.0  (Visual Studio 2008)
MSVC-10.0 (Visual Studio 2010)
MSVC-11.0 (Visual Studio 2012)
MSVC-12.0 (Visual Studio 2013)
MSVC-14.0 (Visual Studio 2015)
MSVC-14.1 (Visual Studio 2017)
Really did not expect 14.1 corresponding to 17... uuuuuuuuuuu 14.1 and 2015 have been matched several times and have been reporting errors.

Leave a Reply

Your email address will not be published. Required fields are marked *