c++ fmt 库安装和使用示例、clion配置

安装

  • git clone  https://github.com/fmtlib/fmt.git
  • make .
  • mkae  &&  make install

CLion使用

  • 使用和安装存在出入
  • 下载源码,可以先 clone 到你的项目中去,https://github.com/fmtlib/fmt ,我放到的是项目的 dependencies 目录
  • 然后在 CMake 中加上这两句:
add_subdirectory(dependencies/fmt EXCLUDE_FROM_ALL)
target_link_libraries(fmt_demo fmt-header-only)
  • 其中 EXCLUDE_FROM_ALL 表示将这个项目移除出 make 列表。
  • 接着是链接 fmt-header-only 这个库,使用   借用源码 和 生成的库文件 ,不要最后一步  mkae  &&  make install

 具体例子

屏幕截图

c++ fmt 库安装和使用示例、clion配置_第1张图片

你可能感兴趣的:(C++,加密机)