Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Eclipse give an errors when I try to compile Opencv program

./src/CMakeFiles/ multiple definition of info_compiler' ./src/CMakeFiles/ first defined here ./src/CMakeFiles/ multiple definition ofinfo_platform' ./src/CMakeFiles/ first defined here ./src/CMakeFiles/ multiple definition of info_arch' ./src/CMakeFiles/ first defined here ./src/CMakeFiles/ In functionmain': /eclipse/opencv/Debug/../src/CMakeFiles/ multiple definition of main' ./src/CMakeFiles/ /eclipse/opencv/Debug/../src/CMakeFiles/ first defined here ./src/dialogwindow.o: In functioncv::MatSize::MatSize(int)': /eclipse/opencv/Debug/../src/dialogwindow.cpp:18: multiple definition of `main' ./src/CMakeFiles/ first defined here collect2: error: ld returned 1 exit status make: ** [opencv] Error 1

include "opencv2/highgui/highgui_c.h"

include<opencv2 highgui="" highgui.hpp="">

include <iostream>

using namespace cv; using namespace std; int main( int argc, char** argv ){ Mat image; image = imread( argv[1], 1 );

if( argc != 2 || ! ) { cout << "No image data \n" <<endl; return="" -1;="" }<="" p="">

namedWindow( "Display Image", CV_WINDOW_AUTOSIZE ); imshow( "Display Image", image );


return 0; }