在Linux上的Eclipse上使用OpenCV创建一个c ++项目

时间:2016-05-02 13:51:34

标签: c++ linux eclipse opencv ubuntu

我在Ubuntu 14.04 LTS上使用OpenCV创建一个c ++项目时遇到问题。 我按照教程中的步骤设置了所有写在这里的路径; http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html#linux-eclipse-usage

但是,当我尝试在网站上为DisplayImage.cpp构建所有内容时,eclipse会向我返回以下错误。我不知道要解决这个问题。如果你能解决这个问题/帮助我,我将不胜感激。 非常感谢。

20:23:27 **** Incremental Build of configuration Debug for project opencv_test3 ****
make all 
Building file: ../src/DisplayImage.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/opencv -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/DisplayImage.d" -MT"src/DisplayImage.o" -o "src/DisplayImage.o" "../src/DisplayImage.cpp"
../src/DisplayImage.cpp: In function ‘int main(int, char**)’:
../src/DisplayImage.cpp:16:30: error: ‘imread’ was not declared in this scope
   image = imread( argv[1], 1 );
                              ^
../src/DisplayImage.cpp:24:52: error: ‘namedWindow’ was not declared in this scope
   namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
                                                    ^
../src/DisplayImage.cpp:25:34: error: ‘imshow’ was not declared in this scope
   imshow( "Display Image", image );
                                  ^
../src/DisplayImage.cpp:27:12: error: ‘waitKey’ was not declared in this scope
   waitKey(0);
            ^
make: *** [src/DisplayImage.o] Error 1

20:23:28 Build Finished (took 484ms)

0 个答案:

没有答案