环境:
Ubuntu14.04


下载cmake(我使用的是3.1.0)
https://cmake.org/files/v3.1/

tar -xvf cmake-3.1.0-Linux-x86_64.tar.gz
sudo mv cmake-3.1.0-Linux-x86_64 /opt/cmake-3.1.0
sudo ln -sf /opt/cmake-3.1.0/bin/* /usr/bin/
cmake --version


下载 yaml-cpp-yaml-cpp-0.6.0.zip
https://github.com/jbeder/yaml-cpp/releases/tag/release-0.6.0
或者
https://github.com/jbeder/yaml-cpp/tags

cd yaml-cpp-yaml-cpp-0.6.0/
mkdir build && cd build

#生成动态库
cmake ..  -DBUILD_SHARED_LIBS=ON
#生成静态库
cmake ..

make

mkdir /home/k/Desktop/output
make DESTDIR=/home/k/Desktop/output install

库文件生成到了output文件夹。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-07
  • 2021-10-31
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2021-05-10
  • 2021-11-05
相关资源
相似解决方案