Google glog error LNK2001: unresolved external symbol "__declspec(dllimport) int fLI::FLAGS_XXXX 错误的
2015-12-15 18:24
1281 查看
想在 windows 下使用 glog,使用类似 FLAGS_max_log_size 来设置参数,结果编译报错。
解决办法是在 项目属性 -> C/C++ -> Preprocessor -> Preprocessor Definitions 加入 GOOGLE_GLOG_DLL_DECL=。
其他各种函数定义未找到的情况,解决方法也是上面的。
比如:
error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl google::InitGoogleLogging(char const *)" (__imp_?InitGoogleLogging@google@@YAXPBD@Z)
1>D:\workspace\ReadTab\Release\SimulateTMC.exe : fatal error LNK1120: 1 unresolved externals
解决办法是在 项目属性 -> C/C++ -> Preprocessor -> Preprocessor Definitions 加入 GOOGLE_GLOG_DLL_DECL=。
其他各种函数定义未找到的情况,解决方法也是上面的。
比如:
error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl google::InitGoogleLogging(char const *)" (__imp_?InitGoogleLogging@google@@YAXPBD@Z)
1>D:\workspace\ReadTab\Release\SimulateTMC.exe : fatal error LNK1120: 1 unresolved externals
相关文章推荐
- golang中interface判断nil问题
- 【django入门教程】Django的安装和入门
- google的guava库 Spliiter使用
- sudo apt-get install g++ 出现“g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
- Django model字段类型清单
- (原创)googlemap开发(一)
- Beam Search Algorithm
- Category - 4
- Golang实现的通用快速排序法,冒泡排序法,插入排序法,选择排序法
- How to deal with an SVM with categorical attributes?
- Learning ROS for Robotics Programming Second Edition学习笔记(十) indigo Gazebo rviz slam navigation
- Learning ROS for Robotics Programming Second Edition学习笔记(十) indigo Gazebo rviz slam navigation
- Learning ROS for Robotics Programming Second Edition学习笔记(十) indigo Gazebo rviz slam navigation
- django 外键model的互相读取
- Google推荐的图片加载库Glide介绍
- golang multipart/form-data POST上传文件
- Django同步创建models table失败
- 书评:《算法之美( Algorithms to Live By )》
- golang字符串转时间戳指定本地时区
- 解决django关于图片无法显示的问题