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 sandeep kaur <sa...@yahoo.co.in> on 2005/09/21 14:19:34 UTC

error while using log4cxx lib in Myapp Example

Hi Everyone,

Thanks for Andreas reply.
But i don't want to use the jre and the ant.

I am able to compile the 0.9.7 version but while using
the .lib file and executing the MyApp example 
given on the following link

http://logging.apache.org/log4cxx/manual/Introduction.html

its giving the following errors:-
bar.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static class
log4cxx::helpers::ObjectPtrT<class log4cxx::Logger>
__cdecl log4cxx::Logger::getLogger(class
std::basic_string<char,struct
std::char_traits<char>,class s
td::allocator<char> > const &)"
(__imp_?getLogger@Logger@log4cxx@@SA?AV?$ObjectPtrT@VLogger@log4cxx@@@helpers@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
foo.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static class
log4cxx::helpers::ObjectPtrT<class log4cxx::Logger>
__cdecl log4cxx::Logger::getLogger(class
std::basic_string<char,struct
std::char_traits<char>,class s
td::allocator<char> > const &)"
(__imp_?getLogger@Logger@log4cxx@@SA?AV?$ObjectPtrT@VLogger@log4cxx@@@helpers@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
foo.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: void __thiscall
log4cxx::Logger::info(class
std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >
const &,char const *,int)" (__imp_?info@
Logger@log4cxx@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z)
foo.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: void __thiscall
log4cxx::Logger::debug(class
std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >
const &,char const *,int)" (__imp_?debu
g@Logger@log4cxx@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z)
Debug/foobar.exe : fatal error LNK1120: 3 unresolved
externals
Error executing link.exe.

and if i include the logger.cpp in the source files on
Visual Studio 6.0

it gives the following error

c:\log4cxx-0.9.7\src\logger.cpp(34) : error C2491:
'Logger::FQCN' : definition of dllimport static data
member not allowed

c:\log4cpp_latest\log4cxx-0.9.7\src\logger.cpp(32) :
error C2491: 'Logger::theClassLogger' : definition of
dllimport static data member not allowed



Can anybody have any idea about this issue.

Regards,
Sandip Kaur



		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com