We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
陈老师,你好! 碰到个问题,在使用protobuf时,我看了codec.h里封装的代码,我在测试中碰到如下问题: 比如我有个 AutoReq.proto,它属于package montnets; 调用 const google::protobuf::Descriptor* descriptor = google::protobuf::DescriptorPool::generated_pool()->FindMessageTypeByName("montnets.AuthReq"); 后校验 descriptor 为nullptr, 如果我在调用这个的前面加上 static montnets::AuthReq request; 就能正常。难道一定要在项目中先使用到具体的一个protobuf类之后它才能放入DescriptorPool 池中,这个怎么优化! 谢谢! 附带:我使用的是protobuf 3.4.1
The text was updated successfully, but these errors were encountered:
https://stackoverflow.com/questions/4767925/how-to-force-gcc-to-link-unreferenced-static-c-objects-from-a-library
Sorry, something went wrong.
No branches or pull requests
陈老师,你好!
碰到个问题,在使用protobuf时,我看了codec.h里封装的代码,我在测试中碰到如下问题:
比如我有个 AutoReq.proto,它属于package montnets;
调用 const google::protobuf::Descriptor* descriptor =
google::protobuf::DescriptorPool::generated_pool()->FindMessageTypeByName("montnets.AuthReq");
后校验 descriptor 为nullptr, 如果我在调用这个的前面加上 static montnets::AuthReq request; 就能正常。难道一定要在项目中先使用到具体的一个protobuf类之后它才能放入DescriptorPool 池中,这个怎么优化!
谢谢! 附带:我使用的是protobuf 3.4.1
The text was updated successfully, but these errors were encountered: