Open Mandylove1993 opened 2 years ago
解决了吗兄弟,我也是这个问题,搞了一下午了
同样的问题,ubuntu20.04,有兄弟知道怎么解决吗?
我已经解决了
git clone --recursive https://github.com/gaoxiang12/slambook2.git
sudo apt install -y libglew-dev libpng-dev python3-dev
cd slambook2/3rdparty/Pangolin
mkdir build && cd build
cmake .. && make && sudo make install
如果是使用原作者的库,需要先运行./scripts/install_prerequisites.sh --dry-run recommended
安装依赖后编译安装
Thanks!
从 Windows 版邮件发送
发件人: HakureiSK 发送时间: 2022年3月17日 14:10 收件人: gaoxiang12/slambook2 抄送: snowman-maker; Comment 主题: Re: [gaoxiang12/slambook2] ch3 编译visualizeGeometry.cpp报错pangolin编译出错 (Issue #222)
我已经解决了
mkdir build && cd build
cmake .. && make && sudo make install
用c++11编译
如果c++11不行就换c++14,总有一个能过,安装前依赖一定要装好
3rdparty就是啊
如果c++11不行就换c++14,总有一个能过,安装前依赖一定要装好
感谢回答,问题已经解决,此处的正确方法是,按照高翔老师给出的readme.txt中的命令安装Pangolin,因该不会报错,但是编译VisualizeGeometry.cpp报错,解决方式是修改ch3中的CmakeList.txt,将编译器标准由C++11改为C++14,可以正常编译,而不是修改Pangolin的CmakeList.txt,我的编译器是gcc9.4.0。
第二版书主要在17-18年写作,很难预料到未来编译环境里的一些问题,大家可能需要多尝试尝试。
我在3rdparty中把pangolin的源码clone下来了,然后到ch3下进行make 就出错了,请各位帮忙看看怎么解决?
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1504:46: error: ‘m_slots’ was not declared in this scope for (auto &group : detail::cow_write(m_slots)) { ^, >::add_slot(sigslot::signal_base< , >::slot_ptr&&)’:
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1538:42: error: ‘m_slots’ was not declared in this scope
auto &groups = detail::cow_write(m_slots);
^, >::disconnect_if(Cond&&)’:
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1560:42: error: ‘m_slots’ was not declared in this scope
auto &groups = detail::cow_write(m_slots);
^, >::clear()’:
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1584:27: error: ‘m_slots’ was not declared in this scope
detail::cow_write(m_slots).clear();
^, >::operator()(U&& ...) [with U = {pangolin::VarState::Event}; Lockable = std::mutex; T = {pangolin::VarState::Event}]’:
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_vars/include/pangolin/var/varstate.h:264:23: required from ‘std::map<std::cxx11::basic_string, std::shared_ptr >::iterator pangolin::VarState::AddUpgradedVar(const std::shared_ptr<pangolin::VarValue >&, const iterator&, bool) [with T = bool; std::map<std::__cxx11::basic_string, std::shared_ptr >::iterator = std::_Rb_tree_iterator<std::pair<const std:: cxx11::basic_string, std::shared_ptr > >]’
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_vars/include/pangolin/var/varstate.h:205:13: required from ‘std::shared_ptr pangolin::VarState::GetOrCreateVar(const T&, const pangolin::VarMeta&) [with T = bool]’
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_vars/include/pangolin/var/var.h:83:50: required from ‘pangolin::Var::Var(const T&, const pangolin::VarMeta&) [with T = bool]’
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_vars/include/pangolin/var/var.h:88:35: required from ‘pangolin::Var::Var(const string&, const T&) [with T = bool; std::cxx11::string = std::cxx11::basic_string]’
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_display/include/pangolin/display/widgets.h:153:50: required from here
/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1180:65: error: ‘slots_reference’ was not declared in this scope
cow_copy_type<list_type, Lockable> ref = slots_reference();
~~ /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1504:46: note: suggested alternative: ‘m_block’ for (auto &group : detail::cow_write(m_slots)) { ^~~ m_block /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp: In member function ‘void sigslot::signal_base<~~ /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1538:42: note: suggested alternative: ‘m_block’ auto &groups = detail::cow_write(m_slots); ^~~ m_block /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp: In member function ‘size_t sigslot::signal_base<~~ /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1560:42: note: suggested alternative: ‘m_block’ auto &groups = detail::cow_write(m_slots); ^~~ m_block /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1564:28: error: range-based ‘for’ expression of type ‘auto’ has incomplete type for (auto &group : groups) { ^~/home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp: In member function ‘void sigslot::signal_base<~~ /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp:1584:27: note: suggested alternative: ‘m_block’ detail::cow_write(m_slots).clear(); ^~~ m_block /home/zhuft/readbook/slambook2/3rdparty/Pangolin/components/pango_core/include/sigslot/signal.hpp: In instantiation of ‘void sigslot::signal_base<