Create OpenCV static link library (VS2012+OPENCV2.4.12+TBB) with CMake

Source: Internet
Author: User

1. Preparatory work:

1) Complete visual Studio2012 installation;

2) Download and unzip the CMake3.5.0;

3) Download and unzip the OpenCV2.4.12;

4) Download and unzip the Tbb44_20160128oss.

2. Create a OpenCV static link library to compile the target directory for the project.

3. Compile the project by CMake build OpenCV static link library:

1) Double-click the Cmake-gui.exe, delete the configuration cache, select the build platform, as shown in;

2) Select OpenCV2.4.12 Source directory (CMakeLists.txt directory) and the 2nd step to create a static library project target directory;

3) After clicking the Configure option in the GUI, tick WITH_TBB in with, remove the items that are not, and then set the contents of the include in the extracted TBB after configure again, as shown in.

4) Click Configure to remove the BUILD_SHARED_LIBS option in build.

5) Click Generate to build the OpenCV Static Library compilation project under Visual Studio 2012.

4. Use VS2012 to open the OpenCV.sln for compilation, and then the required static library appears under Lib\debug (Release).

Create OpenCV static link library (VS2012+OPENCV2.4.12+TBB) with CMake

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.