logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adnene Ben Abdallah <aBenAbdal...@infovista.com>
Subject RE: VC5 and logger
Date Fri, 02 Jul 2004 14:11:55 GMT

  I had a problem when I tried to build log4cxx with the last MS Platform
SDK available. I got the following message:
--------------------Configuration: dll - Win32 Release--------------------
F:\Development\IPA\log4\log4cxx-0.9.7\src\condition.cpp(73) : error C2664:
'InterlockedCompareExchange' : cannot convert parameter 1 from 'void ** ' to
'volatile long *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

log4cxx.dll - 1 error(s), 0 warning(s)
This seems to be the same problem.
Could you please confirm that? I suppose that the patch you had proposed
isn't enough. I suppose that here we need more than "#if _MSC_VER <= 1200",
but I can't see what would be the right condition to add?


-----Original Message-----
From: carnold@houston.rr.com [mailto:carnold@houston.rr.com] 
Sent: jeudi 1 juillet 2004 20:02
To: log4cxx-user@logging.apache.org
Subject: RE: VC5 and logger

The end of this message contains a patch file that allowed me to build the
CVS version of log4cxx using Visual C++ 97 in the IDE.  The changes to make
to 0.9.7 are nearly identical.

The first step (not represented in the patch) is to change "Format Version
6.0" to "Format Version 5.0" in all the *.dsw and *.dsp files in the msvc
directory.  If permanently changed to "5.0", I think that VC6 will just
prompt to upgrade when first loaded.

The second step (again not in the patch) is to change config_msvc.h to
comment out HAVE_XML and HAVE_MS_XML.   VC5 doesn't like building with

The following issues were encountered:

The use of "#if _MSC_VER == 1200" to guard Interlocked* methods.  I just
changed these to "#if _MSC_DEV <= 1200" which causes the VC6 forms to be
used for VC6 and all earlier version.

dateformat.cpp: VC5 would generate an internal compiler error when trying to

string = string + char* + string;

I expanded these to:

string = string;
string += char*;
string += string;

logger.cpp: VC5 would complain that a control path did not return a value
even though an exception was thrown.  I added a unreachable return statement
(which might result in a compile warning or error) with another compiler.

optionconverter.cpp: Included "log4cxx/appenderskeleton.h" to avoid a
problem expanding ObjPtrT<Appender>


VC5 complained about the HKEY typedef.  The wtypes.h provided with VC 5 -
7.1 all define HKEY as a void* or a void RPC_FAR*.

View raw message