logging-log4cxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kadarkarai, Prabhakar \(Prabhakar\)" <prabhak...@avaya.com>
Subject RE: Log C++ Linker problem.
Date Tue, 04 Jan 2005 20:15:16 GMT
Thanks for the response. I have found problem by looking at the Log C++
achieves. I had to enter "UNICODE" under C++/preprocessor tab of my
project settings. That I didn't. After entering that the error messages
are gone. 

Here is the link where you can see more details.

Thanks Again,

-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org] 
Sent: Tuesday, January 04, 2005 1:05 PM
To: Log4CXX Dev
Subject: Re: Log C++ Linker problem.

Are you building against log4cxx 0.9.7 or a CVS build?  What version of 
Visual C++ are you using?

The CVS is just recovering from some major surgery, but I was still 
able to compile and link examples/trivial.cpp with a fairly simple VC 6 
project.  Basically, create trivial.dsw in \logging-log4cxx\examples, 
add ..\include to the include path, add ..\build\log4cxxd.lib or 
..\build\log4cxx.lib to the library modules for debug and release 
configurations respectively, and set the debug working build to 
..\build.  I did get an RTL heap debugging warning on the call to 
NDC::pop which I will have to investigate, but everything else seemed 
to work.  I have uploaded the project to 

You should avoid using the _T() macro.  It is no longer needed by the 
CVS version which accepts either char or wchar_t based arguments on the 
public API.  It would be slightly more efficient to use wchar_t 
literals, so it would be slightly better to do:

NDC::push(L"trivial context");
LOG4CXX_DEBUG(rootLogger, L"debug message");


NDC::push("trivial context");
LOG4CXX_DEBUG(rootLogger, "debug message");

but you can choose whatever string type works best for your 
application.  If you are using log4cxx-0.9.7, the wchar_t methods are 
not available.

View raw message