centos7 protobuf生成.h文件之错误处理

使用--proto_path=. --swift_out=. ***.proto 生成swift文件时
报错:
File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).

给出明确的路径就可以了,如:
protoc --proto_path=/opt  --swift_out=/opt  ***.proto

猜你喜欢

转载自blog.csdn.net/sz76211822/article/details/85229285