hi all I followed a tutorial "The OpenCV Tutorials, Release 2.4.5.0" and tried to build opencv for linux i could successfully build a /release but the folder /release/opencv2/ does not contain any of the .hpp files except opencv_modules.hpp file i created a sample folder in /release directory /release/sample and pleaced a file : DisplayImage.cpp containg following code :
#include <stdio.h>
#include "../opencv2/opencv.hpp"
using namespace cv;
int main( int argc, char** argv )
{
Mat image;
image = imread( argv[1], 1 );
if( argc != 2 || !image.data )
{
printf( "No image data \n" );
return -1;
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
return 0;
}
//---------------------------- and CMakeLists.txt containing :
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
add_executable( DisplayImage DisplayImage.cpp )
target_link_libraries( DisplayImage ${OpenCV_LIBS} )
//------------------- when i ran cmake . i got
-- Configuring done -- Generating done -- Build files have been written to: /home/student/Documents/openCV/opencv/release/sample
//------------------- when i ran make command i got
100%] Building CXX object
> CMakeFiles/DisplayImage.dir/DisplayImage.cpp.o
> /home/student/Documents/openCV/opencv/release/sample/DisplayImage.cpp:2:30:
> fatal error: opencv2/opencv.hpp: No
> such file or directory compilation
> terminated. make[2]: ***
> [CMakeFiles/DisplayImage.dir/DisplayImage.cpp.o]
> Error 1 make[1]: ***
> [CMakeFiles/DisplayImage.dir/all]
> Error 2 make: *** [all] Error 2
//---------------------- suggestion are welcome
thankyou
deepak