You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Curt Arnold <ca...@apache.org> on 2004/09/01 19:39:34 UTC

Re: BUG: log4cxx-0.9.7 static lib compile error on MSVC 6

It is a known issue which has been resolved in the CVS version, see 
http://nagoya.apache.org/jira/browse/LOGCXX-8.

Basically the signatures for the InterlockedMethods changed in the 
Platform SDK sometime between VC6 and VC7.  If you are getting this 
error, you are most likely using VC6 with a later Platform SDK.  In 
0.9.7, the value of _MSC_VER was used to determine whether the old 
style or new style signatures were used.  However, this assumes that if 
you are using VC6, you are also using the header files included with 
VC6.  In the current CVS, there is a preprocessor macro which allows 
you to explicitly specify whether the old style interlocks are used.

The simplest way to get 0.9.7 to compile is to remove the later 
Platform SDK from your include path.


On Sep 1, 2004, at 1:26 AM, usr local wrote:

> I'm getting the following compile error with version
> log4cxx-0.9.7 when attempting to build static lib
> using MSVC 6.0:
>
> c:\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
>
> Any ideas?
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>