求log4cpp或log4cplus 已编译好源文件 在VS2005或2008能正常使用的类库

lhsxsh 2008-08-21 03:44:43
求log4cpp或log4cplus 已编译好所有源文件
在VS2005或2008能正常使用的类库
请RAR 下发到lhsen_99@126.com
收到后经测试能用后我把分数都给你(能解决问题的第一人)。
我编译后使用时会出现如下错误 如果能解决同样把分数都给你(能解决问题的第一人)。

错误 1 error LNK2019: 无法解析的外部符号 "public: static void __cdecl log4cpp::PropertyConfigurator::configure(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?configure@PropertyConfigurator@log4cpp@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 _main 中被引用 main.obj


错误 2 fatal error LNK1120: 1 个无法解析的外部命令 e:\MyVS2005\C++\C++ STL开发技术导引\12\Chapter12_1\Debug\Chapter12_1.exe 1
本人刚习C++请多 帮忙 谢谢了
...全文
942 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
inreyou 2011-04-13
  • 打赏
  • 举报
回复
非常感谢grpubr好心人
grpubr 2009-10-16
  • 打赏
  • 举报
回复
不知道楼主会不会再看到,我折腾了1天,总算找到解决的方法了。
编译log4cpp和log4cppDLL之前,把NTeventlog删掉。
然后,把src/FactoryParams.cpp,/src/Localtime.cpp添加到工程里就可以了
echo_love 2008-10-20
  • 打赏
  • 举报
回复
有没有引入log4cplus.lib啊
lhsxsh 2008-08-28
  • 打赏
  • 举报
回复
log4cpp::SimpleConfigurator::configure("/log4cpp.init");
就怎么简单的一语句代码为何会出现错误?
错误 1 error LNK2019: 无法解析的外部符号 "public: static void __cdecl log4cpp::SimpleConfigurator::configure(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?configure@SimpleConfigurator@log4cpp@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 _main 中被引用 main.obj

错误 2 fatal error LNK1120: 1 个无法解析的外部命令 e:\MyVS2005\C++\C++ STL开发技术导引\12\Chapter12_1\Debug\Chapter12_1.exe 1
roger_77 2008-08-27
  • 打赏
  • 举报
回复
log4cpp已编译好所有源文件 ,在VS2005能正常使用的类库:
http://www.dreamcubes.com/webdrive/log4cxx_win32/log4cxx-0.10.0-vc6-June2008.rar

下载后直接用VC2005打开VC6的工程编译,即可在VC2005下使用。
budweiser 2008-08-27
  • 打赏
  • 举报
回复
你把你写的源文件贴上来
lhsxsh 2008-08-27
  • 打赏
  • 举报
回复
我就写了这一句 log4cxx::Logger::getRootLogger()->info("Hello, log4cxx");
这会出现:错误 4 error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual __thiscall log4cxx::helpers::ObjectPtrT<class log4cxx::Logger>::~ObjectPtrT<class log4cxx::Logger>(void)" (__imp_??1?$ObjectPtrT@VLogger@log4cxx@@@helpers@log4cxx@@UAE@XZ),该符号在函数 _main 中被引用 main.obj

无法解析的外部符号 与 该符号在函数 _main 中被引用 到底要何解决?
lhsxsh 2008-08-22
  • 打赏
  • 举报
回复
高手都到哪里去了?
lhsxsh 2008-08-21
  • 打赏
  • 举报
回复
提供具体的方法也行.

15,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧