logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Delfin Rojas" <dro...@moodlogic.com>
Subject RE: win32 and UNICODE
Date Mon, 23 Aug 2004 21:13:45 GMT
I think #ifndef TCHAR should be OK. Make sure you include the tchar.h that
comes with Visual C++ before you include log4cxx. 

About UNICODE and _UNICODE, both are automatically defined if on your
project configuration properties (Visual C++ 7.1) you select "Unicode
character set".

-delfin

> -----Original Message-----
> From: Sean Rohead [mailto:sean.rohead@nextpage.com]
> Sent: Monday, August 23, 2004 1:29 PM
> To: log4cxx-user@logging.apache.org
> Subject: win32 and UNICODE
> 
> I'm trying to use log4cxx in a win32 Unicode project and am having some
> difficulties.  If I don't #define UNICODE, the log4cxx::String is a
> basic_string<char> (because windows uses _UNICODE).  If I do #define
> UNICODE, then I get:
> 
> c:\chrome\ice\client\code\cpp\internal\include\log4cxx\helpers\tchar.h(1
> 07) : error C2371: 'TCHAR' : redefinition; different basic types
> 
> 
> The code in tchar.h looks like this:
> 
> #ifndef TCHAR
> 	typedef wchar_t TCHAR;
> 
> Shouldn't that be #ifndef __TCHAR_DEFINED (or perhaps _TCHAR_DEFINED)?
> 
> Sean Rohead




Mime
View raw message