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