我正在使用PCL库,在内部它需要boost库。
不幸的是,我遇到了这样的错误。明确地,我没有引用任何boost库,但是PCL库引用了。
/usr/include/boost/graph/graph_concepts.hpp: In destructor ‘boost::concepts::AdjacencyMatrix<G>::~AdjacencyMatrix()’:
/usr/include/boost/graph/graph_concepts.hpp:368:17: error: missing template arguments before ‘(’ token
/usr/include/boost/graph/graph_concepts.hpp: In member function ‘void boost::concepts::AdjacencyMatrix<G>::const_constraints(const G&)’:
/usr/include/boost/graph/graph_concepts.hpp:372:17: error: missing template arguments before ‘(’ token发布于 2014-04-29 15:40:02
这很奇怪。
当我移动头文件时,问题就解决了。
#include<pcl/registration/icp.h>
到所有头文件的开头。不再有错误,程序执行,给出了预期的结果!
发布于 2014-04-29 14:23:00
不能复制它。
我所做的是:
sudo apt-get install libeigen3-dev libflann-dev libboost-all-dev cmake build-essential汇编花了一段时间
cd /tmp
tar xf ~/Downloads/pcl-pcl-1.7.1.tar.gz
cd pcl-pcl-1.7.1/
cmake .
time make -sj输出以
...
Linking CXX executable ../bin/pcl_train_linemod_template
[100%] Built target pcl_train_linemod_template
real 13m55.327s
user 82m49.499s
sys 2m24.611s令人印象深刻。但显然没有编译错误(http://paste.ubuntu.com/7359651/)。我希望你能找出对你有什么不同的。
发布于 2014-04-30 16:43:11
最有可能的是,您的程序头文件中有一些#define ZZZ语句,并且宏ZZZ与Boost中的某些标识符发生冲突。这就是为什么当您将icp.h移到第一行时,问题就消失了。
要找出是哪个宏导致了问题,请仔细查看您指定的行:/usr/include/boost/graph/graph_concepts.hpp:368。宏可能替换或移除该行或其附近的一个标识符。祝好运。
https://stackoverflow.com/questions/23366366
复制相似问题