diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-06-29 14:50:05 +0900 |
---|---|---|
committer | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-06-30 13:32:57 +0900 |
commit | aea13caea6ffc5a373fbfd5157c57d026b9f9a7a (patch) | |
tree | f0f3eeb4798001e319e192ed5a21ed61a52c20fd /docs/sources | |
parent | e314f126c1c5dc81c0d8ab33a4b450a10674052c (diff) |
grpc: Improve building tools and docs for C++ client
This patch includes the following fixes:
* update Makefile for protobuf 3.3.0 / gRPC 1.4.1
* make build.sh which generates stub codes
and builds GoBGP shared library
(instead, remove those operations from docs)
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'docs/sources')
-rw-r--r-- | docs/sources/grpc-client.md | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/docs/sources/grpc-client.md b/docs/sources/grpc-client.md index 3cb8e55c..088f6d60 100644 --- a/docs/sources/grpc-client.md +++ b/docs/sources/grpc-client.md @@ -79,19 +79,13 @@ We use .so compilation with golang, please use only 1.5 or newer version of Go L ['tools/grpc/cpp/gobgp_api_client.cc'](https://github.com/osrg/gobgp/blob/master/tools/grpc/cpp/gobgp_api_client.cc) shows an example for getting neighbor's information. -Clone this repository and build API example: +We provide ['tools/grpc/cpp/build.sh'](https://github.com/osrg/gobgp/blob/master/tools/grpc/cpp/build.sh) to build this sample code. +This script also generates stub codes and builds GoBGP shared library. + +Let's build the sample code: ```bash -export PATH="$PATH:/opt//grpc/bin:/opt/protobuf_3.0.0_alpha4/bin/" - -cd /usr/src -git clone https://github.com/osrg/gobgp.git -cd gobgp/gobgp/lib -go build -buildmode=c-shared -o libgobgp.so *.go -cp libgobgp.h /usr/src/gobgp/tools/grpc/cpp -cp libgobgp.so /usr/src/gobgp/tools/grpc/cpp -cp /usr/src/gobgp/api/gobgp.proto /usr/src/gobgp/tools/grpc/cpp/gobgp_api_client.proto -cd /usr/src/gobgp/tools/grpc/cpp -make +$ cd $GOPATH/src/github.com/osrg/gobgp/tools/grpc/cpp +$ bash build.sh ``` ### Let's run it: |