Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
protobuf集成的方式有两种:
(1) protobuf的源代码编译后不安装,将源代码的路径链接到third_party:
这个时候需要的资源:
a.头文件目录: third_party/protobuf/src/
b.protoc: third_party/protobuf/src/protoc
c.库文件: third_party/protobuf/src/.libs/libprotobuf.a
此时需要修改config.mk
但是最后在sample的时候还是core.dump了。
(2) 在编译安装protobuf的时候,指定--prefix到protobuf,然后安装:
但是发现现存代码中还有硬编码到src的,需要修改
不知道是什么原因,感觉提交的代码是上面两种的混合,可能是多人开发维护的环境不一致吧。不过作为一般用户,还是建议第二种方式。