undefined reference to `vtable for YAML::BadConversion' 报错的解决方法

 Bug

  在编译用到yaml程序的时候,遇到如下报错:

/home/liuhang/Documents/Momenta/catkin_ws/devel/lib/libloam.so: undefined reference to `vtable for YAML::BadConversion'
/home/liuhang/Documents/Momenta/catkin_ws/devel/lib/libloam.so: undefined reference to `typeinfo for YAML::BadConversion'
/home/liuhang/Documents/Momenta/catkin_ws/devel/lib/libloam.so: undefined reference to `YAML::BadConversion::~BadConversion()'
/home/liuhang/Documents/Momenta/catkin_ws/devel/lib/libloam.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder>)'

Solution

最终在yaml的github中找到了解决方法。

下载0.5.1版本的yaml https://github.com/jbeder/yaml-cpp/releases,把之前安装的yaml删掉,重新编译安装。

至于怎么删除以前版本的yaml,直接把之前编译yaml的文件夹全部删掉就OK了。

至于怎么重新编译安装,mkdir build, cd build, cmake .. , make, sudo make install 。

转载请注明出处~

猜你喜欢

转载自blog.csdn.net/liudahanghang/article/details/82778581