简体   繁体   中英

Using CodeLite IDE for OpenCV in Ubuntu 16.04 LTS

I can compile a sample C++ Code (including OpenCV) using both CMake and following command line:

g++ cv.cpp -o cvapp pkg-config --cflags --libs opencv

But I want to use CodeLite IDE for this purpose. I have added

/usr/include/opencv;/usr/include/opencv2

in the Include Paths under compiler tab in project settings. And added

/usr/local/lib

in Libraries Search Path under Linker tab.

But still, I am getting errors shown in this screenshot for a sample code. Now is it possible to use CodeLite for OpenCV coding environment? If yes then how?

To use opencv in codelite the simplest option is to continue using pkg-config, you can do this as follows:

  1. Right click on the project name and select settings...

在此处输入图片说明

2.Open the following dialog and select the Linker tab, in that window add pkg-config --cflags --libs opencv in linker-options:

在此处输入图片说明

Press the apply button and Ok and then compile the project.

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