Boost logo

Boost Users :

Subject: Re: [Boost-users] error C2733 second C linkage of overloaded function InterlockedIncrement not allowed
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-22 11:06:02


Marcus Gehr:

> Hello,
>
> Sorry i forgot.
> I'm using boost verison 1.36

You mentioned lines 55-63, these are (in 1.36):

#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )

extern "C" long __cdecl _InterlockedIncrement( long volatile * );
extern "C" long __cdecl _InterlockedDecrement( long volatile * );
extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long,
long );
extern "C" long __cdecl _InterlockedExchange( long volatile *, long);
extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long);

But there is a CE-specific section before that:

#elif defined(_WIN32_WCE)

// under Windows CE we still have old-style Interlocked* functions

extern "C" long __cdecl InterlockedIncrement( long* );
extern "C" long __cdecl InterlockedDecrement( long* );
extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
extern "C" long __cdecl InterlockedExchange( long*, long );
extern "C" long __cdecl InterlockedExchangeAdd( long*, long );

Why does it not get selected in your configuration? Is _WIN32_WCE defined?
It should be set to 600 for CE 6.0 (in principle). (Or is it 0x600?)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net