2. install gflags protobuf leveldb: libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev. If you need to statically link leveldb, install libsnappy-dev as well.
1. install common deps: `git g++ make libssl-dev`
2. install gflags, protobuf, leveldb, including: `libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev`. If you need to statically link leveldb, install `libsnappy-dev` as well.
3. git clone this repo. cd into the repo and run
```
$ sh config_brpc.sh --headers=/usr/include --libs=/usr/lib
$ make
```
4. make
### run example
```
$ cd example/echo_c++
...
...
@@ -20,9 +19,10 @@ $ make
$ ./echo_server &
$ ./echo_client
```
Examples link brpc statically, if you need to link libbrpc.so, `make clean` and `LINK_SO=1 make`
### run examples with cpu/heap profilers
Install libgoogle-perftools-dev and re-run config_brpc.sh before compiling
Install `libgoogle-perftools-dev` and re-run config_brpc.sh before compiling
### compile tests
Install gmock and gtest, use the gtest embedded in gmock and don't install libgtest-dev