We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/apache/incubator-brpc
git clone https://github.com/apache/incubator-brpc.git
其中一个gflags需要cmake3,所以要安装cmake3:
yum install cmake3
其中gflags、leveldb默认cmake会编译成静态库,编译brpc时会出错:
/usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S against `.rodata' can not be used
需要编译成动态库,编译方法如下:
mkdir bld cd bld cmake3 -DBUILD_SHARED_LIBS=ON .. make -j 8
在确认安装好上述依赖后,cd到brpc的下载目录中。
mkdir bld cd bld cmake3 .. make
编译brpc尽量不要并行make。容易编译失败
example下面的的代码用cmake编译,可能会失败。最好用普通make编译的方式。
首先要先生成config.mk:
sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib
headers和libs指定第三方库的头文件和库路径。尽量集中到一起,不在一起的可以建立软连接。
生成config.mk之后,可以去example目录编译。比如:
cd example/echo_c++ make
The text was updated successfully, but these errors were encountered:
No branches or pull requests
github主页:
https://github.com/apache/incubator-brpc
克隆:
本地依赖
cmake
其中一个gflags需要cmake3,所以要安装cmake3:
依赖第三方库
其中gflags、leveldb默认cmake会编译成静态库,编译brpc时会出错:
需要编译成动态库,编译方法如下:
编译brpc
在确认安装好上述依赖后,cd到brpc的下载目录中。
编译brpc尽量不要并行make。容易编译失败
编译example
example下面的的代码用cmake编译,可能会失败。最好用普通make编译的方式。
首先要先生成config.mk:
headers和libs指定第三方库的头文件和库路径。尽量集中到一起,不在一起的可以建立软连接。
生成config.mk之后,可以去example目录编译。比如:
The text was updated successfully, but these errors were encountered: