首页 > Windows开发 > 详细

glog Windows Visual Studio 2013 编译项目

时间:2021-05-31 12:06:34      阅读:26      评论:0      收藏:0      [点我收藏+]

glog 基本使用

glog基本使用

静态链接glog.lib库

1. Error C1189#error:  ERROR macro is defined. Define GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h.
See the document for detail.gameserverd:\mycode\code\glog\src\windows\glog\log_severity.h55

2. Error LNK2019unresolved external symbol "__declspec(dllimport) public: __thiscall google::LogMessage::LogMessage(char const *,int)" 
(__imp_??0LogMessage@google@@QAE@PBDH@Z) referenced in function "private: void __thiscall MainFrame::OnHello(class wxCommandEvent &)" 
(?OnHello@MainFrame@@AAEXAAVwxCommandEvent@@@Z)  gameserver D:\mycode\code\gameserver\main.obj1

glog如何采用静态链接的方式呢?

  1. 在自定义工程中添加GOOGLE_GLOG_DLL_DECL=,此宏才是使用静态链接库时必须的!
  2. GLOG_NO_ABBREVIATED_SEVERITIES这两个宏,第二个宏主要是为了避免与windows.h冲突(下面会讲到),

参考

glog vs2015 编译问题

glog Windows Visual Studio 2013 编译项目

原文:https://www.cnblogs.com/flyinggod/p/14829984.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!