我使用的boost库是最新的1.53.0的,也是通过源码编译安装。在编译代码过程中出现如下错误:
[ 41%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_grabber.cpp.o
In file included from /home/hcx/download/PCL-1.6.0-Source/common/include/pcl/point_types.h:301:0,
from /home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:43:
/home/hcx/download/PCL-1.6.0-Source/common/include/pcl/impl/point_types.hpp:1009:68: warning: ‘SHOT’ is deprecated [-Wdeprecated-declarations]
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘pcl:ointCloud<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >:tr pcl::OpenNIGrabber::convertToEigenPointCloud(const boost::shared_ptr<openni_wrapper::Image>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:738:57: error: no matching function for call to ‘boost::shared_array<unsigned char>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:738:57: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = unsigned char]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<unsigned char>::shared_array(const boost::shared_array<unsigned char>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<unsigned char>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:768:63: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:768:63: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘pcl:ointCloud<pcl:ointXYZI>:tr pcl::OpenNIGrabber::convertToXYZIPointCloud(const boost::shared_ptr<openni_wrapper::IRImage>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:849:63: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:849:63: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:850:60: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:850:60: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘typename pcl:ointCloud<T>:tr pcl::OpenNIGrabber::convertToXYZRGBPointCloud(const boost::shared_ptr<openni_wrapper::Image>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const [with PointT = pcl:ointXYZRGB, typename pcl:ointCloud<T>:tr = boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >]’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:514:104: instantiated from here
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:621:57: error: no matching function for call to ‘boost::shared_array<unsigned char>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:621:57: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
.........
........
/usr/local/include/boost/smart_ptr/shared_ptr.hpp: In function ‘void boost::detail::sp_assert_convertible() [with Y = int [], T = short unsigned int []]’:
/usr/local/include/boost/smart_ptr/shared_array.hpp:67:9: instantiated from ‘boost::shared_array<T>::shared_array(Y*) [with Y = int, T = short unsigned int]’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:576:69: instantiated from here
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:261:18: error: size of array is negative
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/openni_grabber.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
请问哪位在Ubuntu12.04上成功编译了PCL?这个问题是boost库的问题么?
|