aam-opencv编译失败,使用OpenCVConfig.cmake

时间:2013-02-08 00:42:34

标签: c++ ubuntu opencv makefile cmake


以下是项目http://code.google.com/p/aam-opencv/

的链接

我正在尝试使用OpenCV 2.4.9在Ubuntu 12.04上编译这个项目。我已经成功生成了CMake文件但是当我开始使用make编译它时出现编译错误。我正在使用从/ usr / local / share / OpenCV文件夹中复制的新OpenCVConfig.cmake进行编译。我也在CMakeLists.txt中进行了必要的更改。任何帮助将不胜感激。 我在编译时得到以下转储。

[  5%] Building CXX object CMakeFiles/qt-aamtrainer.dir/src/main.cpp.o
In file included from /home/aam-opencv-read-only/include/lkFitting.h:22:0,
                 from /home/aam-opencv-read-only/src/main.cpp:34:
/home/aam-opencv-read-only/include/delaunay.h:130:44: error: ‘CvSubdiv2DEdge’ has not been declared<br>
/home/aam-opencv-read-only/include/delaunay.h:135:5: error: ‘CvSubdiv2D’ does not name a type<br>
/home/aam-opencv-read-only/include/delaunay.h:137:5: error: ‘CvSubdiv2D’ does not name a type<br>

1 个答案:

答案 0 :(得分:2)

OpenCV 2.4.3是现在的官方&amp;稳定释放,而非2.4.9。

要解决该编译错误,只需编辑delaunay.h并添加:

#include "opencv2/legacy/legacy.hpp"