windows64安装protobuf

protobuf

  github地址

https://github.com/protocolbuffers/protobuf

  golang库地址

https://github.com/golang/protobuf/

安装:

  查看https://github.com/protocolbuffers/protobuf/tree/master/src#c-installation---windows
  继而安装https://github.com/protocolbuffers/protobuf/release/latest
  https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip
  下载后解压将proto.exe复制到C:\Program Files\Go\bin目录中,更改所有者权限

安装golang编译插件

 go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
 go get -u google.golang.org/grpc
 protoc --go_out=plugins=grpc:. *.proto

 

posted @ 2022-03-29 11:05  linyouyi  阅读(339)  评论(0编辑  收藏  举报