protobuf相关安装

您所在的位置:网站首页 proteus80找不到库 protobuf相关安装

protobuf相关安装

2024-07-02 20:30| 来源: 网络整理| 查看: 265

整个安装过程都是在root用户下

预备安装:abseil库 https://github.com/abseil/abseil-cpp.git cd abseil-cpp mkdir build && cd build 编译 cmake -DABSL_BUILD_TESTING=ON -DABSL_USE_GOOGLETEST_HEAD=ON -DCMAKE_CXX_STANDARD=14 .. 安装 cmake --build . --target all 验证 ctest

编译一个小代码进行测试

mkdir examples cd examples git clone https://github.com/abseil/abseil-cpp.git touch hello_world.cc touch CMakeLists.tx

填充代码和cmakelist文件 hello_world.cc

#include #include #include #include "absl/strings/str_join.h" int main() { std::vector v = {"foo","bar","baz"}; std::string s = absl::StrJoin(v, "-"); std::cout


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3