Hi, This appears to be a problem between different versions of MS VC++.
I applied this fix, as provided in http://issues.apache.org/jira/browse/AXISCPP-557. However, this was on MS VC++ 6.0, and despite the API docs, needed to use the signatures you see currently in the code. It would appear the signature of this method has been changed for VC++ 7.1 - so we presumably need some way to determine which version of MS VC++ is being used. Regards, Adrian _______________________________________ Adrian Dick ([EMAIL PROTECTED]) "Rob Lievaart" <[EMAIL PROTECTED]> wrote on 11/04/2005 13:25:33: > Hi All, > > I just got the latest Axis-C++ sources from anoncvs, and when I try to > compile them I get > the following error: > > ...\Axis.cpp(302) : 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 > > > When I check the source I see that the function is called as: > > InterlockedCompareExchange( (void **), (void *), (void *) ) > > Whereas the prototype, according to my documentation is: > > LONG InterlockedCompareExchange( LONG volatile* Destination, LONG > Exchange, LONG Comperand ); > > And the compiler refuses to do the conversion from void ** to LONG > volatile *. > At first I thought the problem was only in the types used, and that > VC7.1 was being > picky about the conversions. But after looking again I noticed that the > call is made > as: > > InterlockedCompareExchange(((void **)&g_uModuleInitializing), (void > *)&exchange, (void *) &comperand)) > > The first thing is the casts, void** and void* that the compiler is > complaining about, > the first parameter should be a LONG volatile *, and it would be without > the cast to > (void**), but the second and third parameters should be LONG, and > according to the > documentation, the _value_ that it is to be exchanged/compared. And NOT > the pointer. > > So my guess is that the line should be: > > InterlockedCompareExchange( &g_uModuleInitializing, exchange, comperand > ) > > If I make this change the file compiles, but I don't know if that is the > > correct fix. > > The functions in question were added March 18, according to CVS. > > I attached a diff of the latest cvs version. > > > Kind Regards, > > > Rob Lievaart. > > [attachment "Axis.cpp.diff" deleted by Adrian Dick/UK/IBM]
