编译问题

Posted gary-guo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了编译问题相关的知识,希望对你有一定的参考价值。

版本boost1.64,出现了

In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:21:0,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/include/camodocal/chessboard/Spline.h:20,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:7:
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::unbounded_array<T, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:299:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, s);
                  ^
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::bounded_array<T, N, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:494:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, s);
                  ^
In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:21:0,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/include/camodocal/chessboard/Spline.h:20,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:7:
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::unbounded_array<T, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:299:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, s);
                  ^
/usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::bounded_array<T, N, ALLOC>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/storage.hpp:494:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, s);
                  ^
In file included from /home/gary/catkin_ws/src/VINS-Mono/camera_model/include/camodocal/chessboard/Spline.h:22:0,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:7:
/usr/local/include/boost/numeric/ublas/matrix.hpp: In member function ‘void boost::numeric::ublas::c_matrix<T, M, N>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/matrix.hpp:5977:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, N);
                  ^
In file included from /home/gary/catkin_ws/src/VINS-Mono/camera_model/include/camodocal/chessboard/Spline.h:22:0,
                 from /home/gary/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:7:
/usr/local/include/boost/numeric/ublas/matrix.hpp: In member function ‘void boost::numeric::ublas::c_matrix<T, M, N>::serialize(Archive&, unsigned int)’:
/usr/local/include/boost/numeric/ublas/matrix.hpp:5977:18: error: ‘make_array’ is not a member of ‘boost::serialization’
             ar & serialization::make_array(data_, N);
                  ^
VINS-Mono/camera_model/CMakeFiles/Calibration.dir/build.make:86: recipe for target ‘VINS-Mono/camera_model/CMakeFiles/Calibration.dir/src/chessboard/Chessboard.cc.o‘ failed
make[2]: *** [VINS-Mono/camera_model/CMakeFiles/Calibration.dir/src/chessboard/Chessboard.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

 

在出问题的文件Chessboard.hpp里面加上如下头文件#include <boost/serialization/array_wrapper.hpp>即可解决问题。







































以上是关于编译问题的主要内容,如果未能解决你的问题,请参考以下文章

导致资产预编译在heroku部署上失败的代码片段

Notepad++编辑器——Verilog代码片段直接编译

损坏的顶点和片段着色器

C++ 解释器/控制台/片段编译器

Android 逆向Android 逆向通用工具开发 ( Android 平台运行的 cmd 程序类型 | Android 平台运行的 cmd 程序编译选项 | 编译 cmd 可执行程序 )(代码片段

错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段