Skip to content
New issue

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

pb2.5无法编译(我删除了原来的*.pb.h *.pb.cc,用2.5版本重新编译了*.proto) #12

Closed
zhuyuhui opened this issue Jun 14, 2014 · 3 comments

Comments

@zhuyuhui
Copy link

g++ -O2 -pipe -W -Wall -fPIC -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DHAVE_SNAPPY -Isrc -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/include -c -o src/sofa/pbrpc/builtin_service.pb.o src/sofa/pbrpc/builtin_service.pb.cc

src/sofa/pbrpc/builtin_service.pb.cc: 在函数‘void sofa::pbrpc::builtin::protobuf_AddDesc_builtin_5fservice_2eproto()’中:
src/sofa/pbrpc/builtin_service.pb.cc:413:3: 错误: ‘protobuf_AddDesc_sofa_2fpbrpc_2frpc_5foption_2eproto’不是‘sofa::pbrpc’的成员

make: *** [src/sofa/pbrpc/builtin_service.pb.o] 错误 1
【我的环境:ubuntu12.04 gcc4.6.3 pb2.5】

@zhuyuhui
Copy link
Author

当然,如果不删除原来的*.pb.h *.pb.cc,直接用pb2.5版本,make直接报 pb2.4 不兼容 2.5的协议格式。。。

@anqin
Copy link
Collaborator

anqin commented Jun 17, 2014

*.pb.h *.pb.cc本来就是proto生成的文件,采用新的pb版本肯定要删除的

On Sat, Jun 14, 2014 at 10:24 AM, 朱玉辉 notifications@github.com wrote:

当然,如果不删除了原来的*.pb.h *.pb.cc,直接用pb2.5版本,make直接报 pb2.4 不兼容 2.5的协议格式。。。


Reply to this email directly or view it on GitHub
#12 (comment).

@qinzuoyan
Copy link
Collaborator

此处我们假设你使用的就是2.4.1版本,因此pb.h和pb.cc文件不是动态生成的。
正在考虑改进Makefile,使pb.h和pb.cc文件可动态生成,这样就可以不依赖固定版本的protobuf了。
另外,“src/compile_proto.sh”还保留着,便于用户自己去重新编译proto。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants