华为云计算 云知识 fmt是什么
fmt是什么

简介

fmt是一个用于C++的开源格式库。 它可以作为printf和iostreams的安全和快速替代品。

编译和测试方式

1.配置编译环境

1)安装wget工具。

yum install wget -y

2)安装或者升级cmake版本到3.1.0或更高版本。

cd /usr/local/src

yum remove cmake cmake-data

wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz

tar -zxvf cmake-3.9.2.tar.gz

cd cmake-3.9.2

./configure

make && make install

----结束

2.获取源码

获取“fmt-6.0.0”源码包。

cd /usr/local/src

wget https://github.com/fmtlib/fmt/archive/6.0.0.tar.gz

3.编译和安装

1)解压软件包。

cd /usr/local/src

tar -zxvf 6.0.0.tar.gz

2)进入fmt的安装目录。

cd fmt-6.0.0/

3)生成Makefile文件。

mkdir build

cd build/

cmake ..

4)安装fmt。

make && make install

----结束

4.运行和验证

查询fmt版本号。

fmt --version

回显信息如下,则表示fmt安装成功。

fmt (GNU coreutils) 8.22

Copyright (C) 2013 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

Written by Ross Paterson.
上一篇:云手机调整资源配额操作指导 下一篇:什么是ELB