Skip to content

Commit 315ca76

Browse files
committed
mod readme
1 parent b51a827 commit 315ca76

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# 编译步骤
2+
## 环境要求
3+
- Linux/Mac: GCC/Clang, CMake 3.0+
4+
- Windows: Visual Studio 2019+, vcpkg
5+
6+
27

38
## Linux/Mac
49

@@ -47,6 +52,24 @@ make install
4752
[参考文档](https://github.com/Microsoft/cpprestsdk/wiki/Getting-Started-Tutorial)
4853
直接通过包管理软件安装的 cpprestsdk 可能不是最新版本, 可能会有未知问题
4954
55+
### 编译安装 protobuf
56+
使用 v3.1.0 版本
57+
```
58+
cd /tmp # 选择暂存源码的目录,此处用 /tmp,也可根据本机环境指定其他系统路径
59+
git clone https://github.com/protocolbuffers/protobuf
60+
cd protobuf
61+
git checkout v3.1.0
62+
mkdir cmake_build
63+
cd cmake_build
64+
cmake ../cmake \
65+
-DCMAKE_BUILD_TYPE=Release \
66+
-DCMAKE_INSTALL_PREFIX=/usr/local/opt/protobuf \
67+
-Dprotobuf_BUILD_TESTS=OFF \
68+
-Dprotobuf_BUILD_SHARED_LIBS=ON
69+
make -j 8
70+
make install
71+
```
72+
5073
### 编译 tigerapi sdk
5174
若使用编译好的sdk,此步骤可跳过
5275
准备工作:根据系统环境调整 CMakeLists.txt 的相关路径

0 commit comments

Comments
 (0)