Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: opencv2/core/core.hpp: No such file or directory

I have used Code::Blocks 10.05 with OpenCV-2.4.0 I have tried to compile a code samples from C:\opencv\samples\cpp

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <string.h>
#include <time.h>

using namespace cv;
using namespace std;

const char * usage =....

The compiler of Code::Blocks say me:

C:\opencv\samples\cpp\calibration.cpp|1|Fattal Error: opencv2/core/core.hpp: No such file or directory|

Is that means I must to change the include code? with this path where my own include folder is? Thats the path from my core.hpp file C:\opencv\modules\core\include\opencv2\core

like image 516
Adriano Marado Avatar asked Nov 12 '22 16:11

Adriano Marado


1 Answers

You need to add the include directory for each of the modules in to the list of directories Code::Blocks will search for includes. This can be done two ways. If you would like them to be included for all projects

Settings -> Compiler & Debugger Settings -> Search Directories.

Or only the current project

Project -> Build Options -> Search Directories
like image 77
ctor Avatar answered Nov 15 '22 05:11

ctor