Skip to content

protobuf installation

maniacchallenge edited this page Jul 29, 2013 · 2 revisions

protobuf installation

This was tested on MAC OS, but it should work for Linux as well.

Java/Eclipse

  • Install the following plugins:

    • and this, in the same fashion
  • download Binaries and test code hier

  • build the binaries:

.

cd protobuf-2.5.0
configure
make
make install
  • Some path-voodoo:

.

cd java
protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto

( you would've had to copy com.google.protobuffrom java/src/main/javato ManiacLib/src, but we already did that ;) ) Source: StackOverflow

  • protoc compiler path in eclipse: (should lead to a file called protoc) path
  • (optional) enable automatic compiling like so
  • find a .proto file and compile it to test your installation: schwupps

Python

protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/addressbook.proto

With the Maniac Structure, that would be:

cd maniacBackbone
protoc -I=../ManiacLib/src/ --python_out=./ ../ManiacLib/src/protoPackets.proto