编译Pangolin错误

本文详细记录了在编译Pangolin过程中遇到的错误,包括调用invoke和visit函数时的匹配问题,以及如何通过安装依赖库如Glew、CMake和Boost来解决这些问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Pangolin/include/mpark/variant.hpp:1083:68: error: no matching function for call to ‘invoke(mpark::detail::visitation::variant::value_visitor<pangolin::ToGlGeometryElement(const pangolin::Geometry::Element&, pangolin::GlBufferType)::__lambda4>, const mpark::detail::alt<0ul, pangolin::Image<float> >&)’                    access::base::get_alt<Is>(static_cast<Vs>(vs))...))                                                                     ^ /home/leveon/Pangolin/include/mpark/variant.hpp:790:15: note: in definition of macro ‘DECLTYPE_AUTO_RETURN’    -> decltype(__VA_ARGS__) { return __VA_ARGS__; }                ^ /home/leveon/Pangolin/include/mpark/variant.hpp:1083:68: note: candidates are:                    access::base::get_alt<Is>(static_cast<Vs>(vs))...))                                                                     ^ /home/leveon/Pangolin/include/mpark/variant.hpp:790:15: note: in definition of macro ‘DECLTYPE_AUTO_RETURN’

 

Pangolin/src/geometry/glgeometry.cpp:46:33: error: no matching function for call to ‘visit(pangolin::ToGlGeometryElement(const pangolin::Geometry::Element&, pangolin::GlBufferType)::__lambda4, const mpark::variant<pangolin::Image<float>, pangolin::Image<unsigned int>, pangolin::Image<short unsigned int>, pangolin::Image<unsigned char> >&)’
         }, attrib_variant.second);

折腾了一上午,才从https://blog.youkuaiyun.com/zzu_seu/article/details/84866858知道https://github.com/stevenlovegrove/Pangolin.git这个源有各种问题导致编译不过。

Pangolin的源:https://github.com/zzx2GH/Pangolin.git

$ sudo apt-get install libglew-dev  #安装Glew
$ sudo apt-get install cmake         #安装CMake
$ sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev  #安装Boost 

下载、编译、安装Pangolin:
$ cd ~/orbslam_ws/src$ git clone https://github.com/zzx2GH/Pangolin.git
$ cd Pangolin$ mkdir build
$ cd build$ cmake -DCPP11_NO_BOOST=1 ..
$ make
$ sudo make install


 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值