描述 .desc 文件的(元).proto 文件在哪里? [英] Where is the (meta) .proto file which describes .desc files?
问题描述
描述 .desc 文件的(元).proto 文件在哪里?
Where is the (meta) .proto file which describes .desc files?
我制作 .desc 文件:
I make .desc files with:
protoc --descriptor_set_out=foo.desc --include_imports foo.proto
我认为 .desc 文件是 protobuf 格式是否正确?
Am I correct in believing that the .desc files are in protobuf format?
如果是这样,我在哪里可以获得描述其格式的 .proto 文件?
If so, where can I get the .proto file which describes their format?
推荐答案
格式为 FileDescriptorSet
定义在 descriptor.proto
中:
The format is FileDescriptorSet
as defined in descriptor.proto
:
https://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.proto
descriptor.proto
通常安装到 /usr/include/descriptor.proto
或 /usr/local/include/descriptor.proto
在 Unix 系统上.descriptor.pb.h
与 protobuf 头文件一起安装,descriptor.pb.cc
被编译到 protobuf 库中,所以如果你不需要自己生成它们正在使用 C++.同样,在 Java 中,com.google.protobuf.DescriptorProtos
类被编译到基础库中.
descriptor.proto
is typically installed to /usr/include/descriptor.proto
or /usr/local/include/descriptor.proto
on Unix systems. descriptor.pb.h
is installed with the protobuf headers and descriptor.pb.cc
is compiled into the protobuf library, so you don't have to generate them yourself if you are using C++. Similarly, in Java, the com.google.protobuf.DescriptorProtos
class is compiled into the base library.
这篇关于描述 .desc 文件的(元).proto 文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!