git clone https://github.com/grpc/grpc.git
cd grpc
git submodule update --init
git submodule update --init --recursive //确保库下载完全
cd third_party
git submodule update --init --recursive
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -B.build
make allbuild
make install
错误1
fatal error C1083: 无法打开包括文件: “stdalign.h”: No such file or directory
解决:
visual install 安装 windows11 sdk 10.0.22000.0
修改crypto项目对windows sdk的依赖版本改为10.0.22000
helloworld工程构建
/d/code/Tools/grpc/examples/cpp/helloworld/cmake/build (master)
$ cmake -DCMAKE_PREFIX_PATH="/C:/Program Files/grpc/" ../..