设立好环境变量的情况下,运行代码protoc D:\WorkPath\bin\Person.proto --cpp_out=D:\WorkPath\bin,出现错误 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 D:\WorkPath\bin\Person.proto --cpp_out=D:\WorkPath\bin -I=D:\WorkPath\bin