1.下载源代码
git clone https://github.com/nlohmann/json.git
2.创建build目录并编译:
cd json
mkdir build
cd build/
cmake ..
make
3.安装部署
make install
4.在 CMakefile.txt 中引用,如:
find_package(nlohmann_json 3.6.0 REQUIRED)
target_link_libraries(main.exe nlohmann_json::nlohmann_json)
博客介绍了C++项目的操作流程,包括下载源代码,创建build目录并进行编译,接着完成安装部署,最后说明了在CMakefile.txt中的引用方法。
1396

被折叠的 条评论
为什么被折叠?



