how do i configure opencv with code blocks in ubuntu
i am using ubuntu 15.04, installed opencv 3.00 ,i have latest version of code blocks with me,
Try to run cmake with CodeBlocks generator: cmake ../opencv -G"CodeBlocks - Unix Makefiles"
(Some variants here: http://www.cmake.org/cmake/help/v3.0/...)
This command should generate OpenCV CodeBlocks project in current directory.
Not quite sure what is going on here. 1) Use CodeBlocks to create a new OpenCV project (which simply loads up a lena.jpg for viewing) That creates a directory. 2) go to that current directory and run cmake per your instructions. 3) Now that directory has two different .cbp files contained within. 4) Build and run = error, can't find opencv2/core/core.hpp This answer is clear as mud. Can you help? How do you configure opencv with codeblocks in ubuntu?
if you succeed in doing
make
and make install
commandand 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.
Asked: 2015-07-12 03:33:21 -0600
Seen: 2,422 times
Last updated: Aug 07 '15