You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Srinivas Chamarthi <sr...@gmail.com> on 2008/01/21 15:05:35 UTC

Re: Linker Errors

Hi All,


I am using log4cxx and stlport 5.1.4. I have my project configured in Visual
Studio 2005. But when I try to build my project, I am encountering the
following linker errors.

Error    1    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __thiscall log4cxx::Logger::forcedLog(class
log4cxx::helpers::ObjectPtrT<class log4cxx::Level> const &,class
stlp_std::basic_string<char,class stlp_std::char_traits<char>,class
stlp_std::allocator<char> > const &,class log4cxx::spi::LocationInfo const
&)" (__imp_?forcedLog@ Logger@log4cxx@@QAEXABV?$ObjectPtrT@VLevel@log4cxx@@@
helpers@2@ABV?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D
@2@@stlp_std@@ABVLocationInfo@spi@2@@Z) referenced in function "public:
virtual void __thiscall Log4CXXLog::debug(char const *)"
(?debug@Log4CXXLog@@ UAEXPBD@Z)    Log4CXXLog.obj
Error    2    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class stlp_std::basic_string<char,class
stlp_std::char_traits<char>,class stlp_std::allocator<char> > const &
__thiscall log4cxx::helpers::MessageBuffer::str(class
log4cxx::helpers::CharMessageBuffer &)" (__imp_?str@ MessageBuffer@helpers
@log4cxx@@QAEABV?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D
@2@@stlp_std@@AAVCharMessageBuffer@23@@Z) referenced in function "public:
virtual void __thiscall Log4CXXLog::debug(char const *)"
(?debug@Log4CXXLog@@ UAEXPBD@Z)    Log4CXXLog.obj
Error    3    error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall log4cxx::File::File(class
stlp_std::basic_string<char,class stlp_std::char_traits<char>,class
stlp_std::allocator<char> > const &)" (__imp_??0File@log4cxx@@ QAE@ABV
?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@@Z)
referenced in function _wmain    Test.obj


And *Curt Arnold *has pointed to me that I have compiled log4cxx with
default vc stl library.

But my client code uses stlport template library.

Does anybody suggest me how to get rid of the errors and compile against
stlport ?


thx,
srinivas