Use EclipseCDT in Ubuntu to create an OpenCV project diagram

Source: Internet
Author: User
Eclipse is very powerful, and EclipseCDT is a good C ++ integrated development environment. After compiling OpenCV2.3.1 in Ubuntu, compile a small program to test whether the compilation is successful, and briefly study the use of EclipseCDT. Compile the OpenCV code and use the makeinstall command to install OpenCV to the/usr/local/directory by default. Add the file directory, library directory, and used OpenCV library files to EclipseCDT.

Eclipse has powerful functions. Eclipse CDT is a good Integrated C ++ development environment. After compiling the OpenCV 2.3.1 library in Ubuntu, to test whether the compilation is successful, compile a small program and briefly study the use of Eclipse CDT.

Compile the OpenCV code and use the make install command to install OpenCV to the/usr/local/directory by default. Add the file directory, library directory, and used OpenCV library file to Eclipse CDT.

Set the compilation parameters in Project Properties> C/C ++ Build> Settings. I am using GCC C ++ Compiler.

In Tool Settings-> gcc c ++ Compiler-> Directories, add the directory of the OpenCV header file:/usr/local/include

Then, in Tool Settings-> gcc c ++ Linker-> Libraries, add the library file directory of OpenCV:/usr/local/lib, and add the used OpenCV library, instead of the library file name libopencv_xxx.xxx, it removes the beginning and end, leaving only opencv_xxx, such as opencv_core.

After setting, you can compile and run the OpenCV program.

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.