google protobuf@centos
- 下载:http://code.google.com/p/protobuf/downloads/list
- 安装:
- unzip protobuf-2.5.0.zip
- cd protobuf-2.5.0
- ./configure
- make
- make check
- make install
- java下编译protobuf:
- 安装maven
- cd protobuf-2.5.0/java
- 按照README.txt编译,在target目录中生成protobuf-java-2.5.0.jar
- 在elipse添加protobuf-java-2.5.0.jar:右键你的工程目录,最后一项属性Properties,第三项Java Build Path,右边选项卡第三项Libraries,然后Add External JARS
- c++下编译protobuf:
- g++ -c filename.pb.cc
- g++ -c filename.cpp
- g++ filename.pb.o filename.o -lprotobuf
浙公网安备 33010602011771号