anirtek / protobuf-tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protobuf example on BU remote server

This tutorial comes from protocol buffers

Must-know of runnning protobuf on BU remote server

Protobuf is installed on my userspace. Similar to Apache Thrift, you need to specify enviornment variables at compile and run time.

  • Protobuf binary
export PATH=/home/phao3/protobuf/bin/bin:$PATH
  • Protobuf Package configuration file location
export PKG_CONFIG_PATH=/home/phao3/protobuf/bin/lib/pkgconfig

cpp

You need to set LD_LIBRARY_PATH for runtime dynamic link.

export LD_LIBRARY_PATH=/home/phao3/protobuf/bin/lib

java

You need to set CLASSPATH for runtime class discovery

export CLASSPATH=/home/phao3/protobuf/protobuf-3.4.0/java/core/target/protobuf.jar

python

You need to set sys.path within the code

import sys
sys.path.append('/home/phao3/protobuf/protobuf-3.4.0/python')

About


Languages

Language:C++ 28.4%Language:Java 28.3%Language:Python 18.0%Language:Makefile 15.3%Language:CMake 10.0%