Thank you for the valuable comments.

I found the cause of my problem.
I have been working on a  project that runs on both Linux and MS Windows.
Well, the default for logchar is wchar_t on MS Windows while UTF8 on Linux.
It's my fault that I did not double check the header file, log4cxx.h 

I modified log4cxx.h as follows and it is working fine now.

#ifdef WIN32
 #define LOG4CXX_LOGCHAR_IS_UNICHAR 0
 #define LOG4CXX_LOGCHAR_IS_UTF8 0
 #define LOG4CXX_LOGCHAR_IS_WCHAR 1
#else
 #define LOG4CXX_LOGCHAR_IS_UNICHAR 0
 #define LOG4CXX_LOGCHAR_IS_UTF8 1
 #define LOG4CXX_LOGCHAR_IS_WCHAR 0
#endif


Regards,

M. Song



----- 메시지 원본 ----
보낸 사람: peter.doornbosch <[EMAIL PROTECTED]>
받는 사람: Log4CXX User <log4cxx-user@logging.apache.org>
보낸 시간: 2008년 12월 11일 (목요일), 2:20:42 AM
제목: Re: Link error when using Layout on MS Windows

Hi,

> Anytime an argument takes a LogString or a logchar*, you should use 
> LOG4CXX_STR() in the same manner you'd use _T() for TCHAR*.


That's valueable information.
Now that i know it, i see that it is mentioned in the FAQ. However, i didn't 
spot it there. I suggest the following question being added to the faq list:

Q: How can i convert a character literal into a LogString?
A: Use the LOG4CXX_STR() macro.

Regards
Peter


      ________________________________________________________ 
180도 달라진 야후! 메일 - 여러 개의 메시지를 동시에 확인? 새로운 야후! 메일의 탭으로 가능해집니다.
http://kr.content.mail.yahoo.com/cgland

Reply via email to