I was able to compile the static version of log4cpp but had linker problems with the DLL version. Any suggestion? For now I am using the static library version.
I'm using VS2005 and encountered the same problem. After much head-scratching, I noticed that the class "log4cpp::FactoryParams" mentioned in the error message is not included in the project. Adding FactoryParams.cpp to the project fixed the problem. This may be a bug in the msvc6 project files for both the static library and the dll.
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should just look at the log4cpp::FactoryParams::find)))
It is a template method but it has implementation in cpp file, try to make it inline - you should copy code implemenation for this method from cpp file to header. Thats all.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I was able to compile the static version of log4cpp but had linker problems with the DLL version. Any suggestion? For now I am using the static library version.
RemoteSyslogAppender.obj : error LNK2001: unresolved external symbol "public: class std::_Tree<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,0> >::const_iterator __thiscall log4cpp::FactoryParams::find(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?find@FactoryParams@log4cpp@@QBE?AVconst_iterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@$0A@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@@Z)
Regards
Hello,
I'm using VS2005 and encountered the same problem. After much head-scratching, I noticed that the class "log4cpp::FactoryParams" mentioned in the error message is not included in the project. Adding FactoryParams.cpp to the project fixed the problem. This may be a bug in the msvc6 project files for both the static library and the dll.
Hope this helps.
Same thing for Localtime.cpp.
HI
I have a similar problem when i link the testmain project.
log4cpp.lib(FileAppender.obj) : error LNK2019: unresolved external symbol "public: class std::_Tree<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,0> >::const_iterator __thiscall log4cpp::FactoryParams::find(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?find@FactoryParams@log4cpp@@QBE?AVconst_iterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@$0A@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@@Z) referenced in function "public: class log4cpp::details::required_params_validator const & __thiscall log4cpp::details::required_params_validator::operator()<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)const " (??$?RV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@required_params_validator@details@log4cpp@@QBEABV012@PBDAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
regards
You should just look at the log4cpp::FactoryParams::find)))
It is a template method but it has implementation in cpp file, try to make it inline - you should copy code implemenation for this method from cpp file to header. Thats all.