logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srkraju <rama...@cmcltd.com>
Subject RE: URGENT compilation error of sample program
Date Sat, 14 Jun 2008 11:58:19 GMT
Thanks Mr. Dale.
I solved the link error problem by location the shared objects generated by
Log4Cxx_0.10.0, Apr_1.2.2, Apr-Util_1.2.2 packages. [ Redhat Enterprise
Linux AS5, g++ version 4.1.1] 

I am trying to run the sample programs (bar.h, bar.cpp, MyApp2 given in the
I am not getting the output exactly as expected.

When I don't pass any argument it's giving
		[facts@localhost Examples_srk]$ ./MyApp2

			0 [0xb7faaa20] INFO MyAppSrk null - Entering
			0 [0xb7faaa20] DEBUG com.foo.bar null - Did it
			0 [0xb7faaa20] INFO MyAppSrk null - Exiting

When I pass one argument it's giving
		[facts@localhost Examples_srk]$ ./MyApp2 TestFile

			log4cxx: Could not read configuration file
			log4cxx: No appender could be found for logger
			log4cxx: Please initialize the log4cxx system

I understand that the configuration file is not properly written. What is
the format to write the configuration file? Can anybody give a template of
configuration file? I also tried with the configuration file given in the
above link. Still it is giving the same output.

thanks& regards

~-----Original Message-----
~From: Dale King [mailto:dalewking@gmail.com]
~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 <ramaras@cmcltd.com> 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


“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"

View raw message