[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4cxx-user
Subject:    error while using log4cxx lib in Myapp Example
From:       sandeep kaur <sandeep_kmca () yahoo ! co ! in>
Date:       2005-09-21 12:19:34
Message-ID: 20050921121934.20517.qmail () web8506 ! mail ! in ! yahoo ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic