Ask Your Question

Revision history [back]

if you succeed in doing

  • cmake configuration
  • make and make install command

and you have a configured system, then open up Code::Blocks, create a new project, select a console project. Then right click on the project name, build options, linker settings. Inside the 'other linker options' you now add the command pkg-config opencv --libs and you make sure that it is in angled brackets (cannot display them here). Finally in your source file you add #include <opencv2/opencv.hpp> and using namespace cv; and you are good to go.