Skip to content
New issue

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

Question:How to use the brpc to build my own apps(如何使用brpc构建自己的程序) #2764

Open
iTomGeller opened this issue Sep 13, 2024 · 2 comments

Comments

@iTomGeller
Copy link

各位大佬我知道这个问题很trival,但是能力有限还是无法解决所以提了一个issue。

请问如何利用brpc这个库构建一个自己的cpp,具体而言有什么方法可以做到像引入一个第三方头文件#include<xxx>这样来调用brpc的方法。

文档里给的都是编译使用给定的example,而似乎没有提及怎么使用brpc写自己的app,还请各位大佬指教。

@wanghenshui
Copy link

wanghenshui commented Sep 14, 2024 via email

@Lin807188583
Copy link

编译时加上target(cmake --build build --target install)会把对应库加到/usr/local。
然后cmake里面要配置相关链接库 保证能找到
然后自己的项目引入头文件(类似#include <brpc/server.h> )这样就可以正常使用了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants