1

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?

nsssayom
  • 364
  • 1
  • 5
  • 21

1 Answers1

2

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

enter image description here

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

enter image description here

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

eyllanesc
  • 235,170
  • 19
  • 170
  • 241