码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu下yaml-cpp的安装

时间:2018-06-30 19:51:24      阅读:720      评论:0      收藏:0      [点我收藏+]

标签:TE   tar   sha   github   blank   因此   usr   rect   .com   

由于要学习的代码中用到了yaml-cpp,因此在此记录一下安装过程,翻译自:stackoverflow

关于yaml-cpp可以看一下yamlyaml-cpp来了解一下。

首先删除本地原有的yaml-cpp库:

The installer just copies the header files to the directory $PREFIX/include/yaml-cpp and the library files to $PREFIX/lib/libyaml-cpp.so. ($PREFIX is probably /usr/local)

Just remove the header directory and the library files and it should be uninstalled.

翻译一下这意思就是安装仅仅是将一些头文件拷贝到$PREFIX/include/yaml-cpp;将一些库文件拷贝到$PREFIX/lib,比如libyaml-cpp.so($PREFIX在Ubuntu下一般是/usr/local)。

因此将头文件目录和这些库文件删除掉,那么就算完成了卸载。

然后是yam-cpp的安装,这里说的是利用源码进行安装的方式:

git clone https://github.com/jbeder/yaml-cpp.git
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

这样就算完成了yaml-cpp的安装。

 

 

Ubuntu下yaml-cpp的安装

标签:TE   tar   sha   github   blank   因此   usr   rect   .com   

原文地址:https://www.cnblogs.com/taolusi/p/9248280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!