protobuf在各个平台下编译好痛苦!!! 各种失败!! 经过两天的努力终于成功了!!!所以有必要记录下,以方便会他人会用到(网上查阅了很多资料, 很是感激那些作者)
去https://code.google.com/p/protobuf/downloads/list下载版本protobuf-2.5.0.tar.bz2, 然后解压 如图
为了解决ios平台下可能的名字空间冲突, 切换到src/google/protobuf下,运行下面的命令
- sed-i''-e's/namespace\google/namespace\google_public/g'$(find.-name\*.h-typef)
- sed-i''-e's/namespace\google/namespace\google_public/g'$(find.-name\*.cc-typef)
- sed-i''-e's/namespace\google/namespace\google_public/g'$(find.-name\*.proto-typef)
- sed-i''-e's/google::protobuf/google_public::protobuf/g'$(find.-name\*.h-typef)
- sed-i''-e's/google::protobuf/google_public::protobuf/g'$(find.-name\*.cc-typef)
- sed-i''-e's/google::protobuf/google_public::protobuf/g'$(find.-name\*.proto-typef)