Though its giving the same error.
I downloaded Ant-1.6.5. and extracted into
/home/facts/Test/apache-ant-1.6.5/ directory. 

g++  test.cpp -I/home/facts/Test/apache-log4cxx-0.10.0/src/main/include
-L/home/facts/Test/apache-ant-1.6.5/lib/

Still its giving the same set of errors.
        test.cpp:(.text+0x21): undefined reference to
`log4cxx::Logger::getLogger(char const*)'
/tmp/ccnWzKdr.o: In function
`log4cxx::helpers::ObjectPtrT<log4cxx::Logger>::~ObjectPtrT()':
test.cpp:(.text._ZN7log4cxx7helpers10ObjectPtrTINS_6LoggerEED1Ev[log4cxx::he
lpers::ObjectPtrT<log4cxx::Logger>::~ObjectPtrT()]+0x40): undefined
reference to `log4cxx::helpers::ObjectPtrBase::~ObjectPtrBase()'
test.cpp:(.text._ZN7log4cxx7helpers10ObjectPtrTINS_6LoggerEED1Ev[log4cxx::he
lpers::ObjectPtrT<log4cxx::Logger>::~ObjectPtrT()]+0x59): undefined
reference to `log4cxx::helpers::ObjectPtrBase::~ObjectPtrBase()'


thanks& regards
srkraju
~-----Original Message-----
~From: Dale King [mailto:[EMAIL PROTECTED]
~Sent: Friday, June 13, 2008 7:56 PM
~To: Log4CXX User
~Subject: Re: URGENT compliation error of sample program (test.cpp)
~
~On Fri, Jun 13, 2008 at 9:59 AM, srkraju <[EMAIL PROTECTED]> wrote:
~>                         g++
~> -I/home/facts/Test/apache-log4cxx-0.10.0/src/main/include/  test.cpp
~>
~> its giving the following error
~>
~> test.cpp:(.text+0x21): undefined reference to
~> `log4cxx::Logger::getLogger(char const*)'
~
~That is a link error, not a compile error. The command line you show
~says to compile and link, but you didn't specify ant libraries to link
~against so it is not linking against log4cxx.
~
~--
~Dale King


DISCLAIMER

“The information contained in this e-mail message and/or attachments to it may 
contain confidential or privileged information. If you are not the intended 
recipient, any dissemination, use, review, distribution, printing or copying of 
the information contained in this e-mail message and/or attachments to it are 
strictly prohibited. If you have received this communication in error, please 
notify us by reply e-mail or telephone and immediately and permanently delete 
the message and any attachments. Thank you"

Reply via email to