单个java文件多引用如何编译_java – 如何在单个命令中编译多个proto文件?

我在单个目录中有两个proto文件,我正在寻找一种方法,可以在单个命令中从这些文件生成类. Protobuf文档说我们需要使用–proto_path参数.

C:\shekhar\proto_trial>dir

Volume in drive C is C

Directory of C:\shekhar\proto_trial

07/25/2014 12:16 PM

07/25/2014 12:16 PM

07/25/2014 12:16 PM

07/25/2014 12:16 PM 230 map.proto

07/23/2014 04:24 PM 161 message.proto

07/25/2014 12:17 PM 1,228 response.proto

3 File(s) 1,619 bytes

3 Dir(s) 50,259,398,656 bytes free

我使用了–proto_path参数,如下所示

C:\shekhar\proto_trial>protoc

--proto_path=C:\shekhar\proto_trial

--java_out=C:\shekhar\proto_trial\java_op

*.proto

但我得到以下错误

message.proto: 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).

请建议一些单独编译所有原型文件的方法.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值