You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/07/23 14:35:21 UTC

[GitHub] [incubator-brpc] GOGOYAO opened a new issue #1182: 自己的工程从brpc自带的log切换到GLOG,编译时出现链接错误

GOGOYAO opened a new issue #1182:
URL: https://github.com/apache/incubator-brpc/issues/1182


   **Describe the bug (描述bug)**
   工程一直用的brpc自带的log,今天打算换到glog,重新编译了brpc和braft(都加上了glog编译的宏),二者的example加上glog的链接库后,能够编译成功。
   但是自己的工程却一直报错误:
   ```
   xxxx : undefined reference to `logging::GetMinLogLevel()'
   xxxx : undefined reference to `logging::LogMessage::LogMessage(char const*, int, int)'
   xxxx : undefined reference to `logging::LogMessage::~LogMessage()'
   ```
   查看编译链接参数,已有`/usr/local/lib/libglog.a`(检查过,这个glog库文件存在)。
   
   自己先看了下头文件`config.h`,BRPC_WITH_GLOG已经设为1
   ![image](https://user-images.githubusercontent.com/18675094/88299056-82857800-cd34-11ea-87b3-fc08c78c3c35.png)
   
   nm看了下libbrpc.a和libbrpc.so,都没有GetMinLogLevel的符号
   ![image](https://user-images.githubusercontent.com/18675094/88299242-bbbde800-cd34-11ea-9dc7-a0a721d3cea6.png)
   
   求帮助
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   编译成功
   
   **Versions (各种版本)**
   OS: centos 7 
   Compiler: gcc 8
   brpc: 最新master分支(11da9c8cbdc2ec8c0da728aedb4ed906717d6e0f   Wed Jul 22 00:19:49 2020)
   protobuf: 3.11
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] GOGOYAO commented on issue #1182: 自己的工程从brpc自带的log切换到GLOG,编译时出现链接错误

Posted by GitBox <gi...@apache.org>.
GOGOYAO commented on issue #1182:
URL: https://github.com/apache/incubator-brpc/issues/1182#issuecomment-663308720


   已解决。make clean之后再编译就好了


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] GOGOYAO closed issue #1182: 自己的工程从brpc自带的log切换到GLOG,编译时出现链接错误

Posted by GitBox <gi...@apache.org>.
GOGOYAO closed issue #1182:
URL: https://github.com/apache/incubator-brpc/issues/1182


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org