使用log4cplus时遇到的链接错误:无法解析的外部符号 "public: __thiscall log4cplus::RollingFileAppender::RollingFileAppende
2015-07-10 11:18
375 查看
<span style="font-size:18px;">1>ImgProcess_server.skeleton.obj : error LNK2001: 无法解析的外部符号 "public: __thiscall log4cplus::RollingFileAppender::RollingFileAppender(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,long,int,bool,bool)" (??0RollingFileAppender@log4cplus@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@JH_N1@Z) 1>ImgProcess_server.skeleton.obj : error LNK2001: 无法解析的外部符号 "class std::basic_ostringstream<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > & __cdecl log4cplus::detail::get_macro_body_oss(void)" (?get_macro_body_oss@detail@log4cplus@@YAAAV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) 1>ImgProcess_server.skeleton.obj : error LNK2001: 无法解析的外部符号 "void __cdecl log4cplus::detail::macro_forced_log(class log4cplus::Logger const &,int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,char const *,int,char const *)" (?macro_forced_log@detail@log4cplus@@YAXABVLogger@2@HABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PBDH2@Z) 1>ImgProcess_server.skeleton.obj : error LNK2001: 无法解析的外部符号 "public: static class log4cplus::Logger __cdecl log4cplus::Logger::getInstance(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?getInstance@Logger@log4cplus@@SA?AV12@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) 1>ImgProcess_server.skeleton.obj : error LNK2001: 无法解析的外部符号 "public: __thiscall log4cplus::NDCContextCreator::NDCContextCreator(wchar_t const *)" (??0NDCContextCreator@log4cplus@@QAE@PB_W@Z) 1>F:\CBIR0706\Server_LAC_Release\Release\server.exe : fatal error LNK1120: 5 个无法解析的外部命令</span>
分析:这是由于当前工程项目的“字符集”设置与log4plus所用的“字符集”不一致所导致的,log4cplus是使用多字节字符集,而当前工程是使用 Unicode 字符集
解决方案:打开项目属性页-常规-字符集,改成“未设置”
相关文章推荐
- 关于时间轴效果的全文解析
- android--存储之SharePreference
- 鹅厂揭秘——高端大气的App电量测试
- Android学习之单位和尺寸
- WebView 设置软键盘弹出将屏幕上移
- Android 开发环境下载地址 -- 百度网盘 adt-bundle android-studio sdk adt 下载
- 【android】来电悬浮窗
- android的edittext设置输入限制,只能输入数字
- 查询app包的uuid
- android 与JS之间的交互
- Android ExpandableListView 一个小例子
- android禁止界面横屏
- NSCharacterSet 最常用的用法
- 关于SSH的启动的LOG4J log4j:WARN No appenders could be found for logger (org.springframework.web.context
- ios开发工具及环境总结
- Android bitmap序列化
- Android 分包机制
- Android — 长按ListView 利用上下文菜单(ActionMode) 进行批量事件处理
- Cocos2d-x 脚本语言Lua介绍
- 用到ListActivity中 , @+id/android:list"和"@android:id/list"的写法