安装yaml-cpp
操作步骤
- 执行以下命令下载安装包。
cd /path/to wget https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.2.zip unzip yaml-cpp-0.6.2.zip cd yaml-cpp-yaml-cpp-0.6.2
- 执行以下命令创建编译目录。
mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/yaml-cpp-install -DBUILD_SHARED_LIBS=ON
- 执行以下命令安装。
make make install
- 执行以下命令设置环境变量。
export LD_LIBRARY_PATH=/path/to/yaml-cpp-install/lib:$LD_LIBRARY_PATH
父主题: 配置编译环境