Boost logo

Boost Users :

Subject: Re: [Boost-users] error when using boost with visual c++
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-02-28 16:57:53


Sean Farrow:

> Hi;
> When using boost with visual c++ 2005, I'm getting the following two
> error:
> c:\program files\microsoft visual studio 8\vc\include\intrin.h(198) :
> error C2373: '_InterlockedExchange' : redefinition; different type
> modifiers
> c:\program files\boost\boost\detail\interlocked.hpp(60) : see
> declaration of '_InterlockedExchange'
>
> Has anyone got any ideas what is causing this?

interlocked.hpp(60) for me is:

extern "C" long __cdecl _InterlockedExchange( long volatile *, long);

intrin.h(198) is:

__MACHINEI(long _InterlockedExchange(long volatile *, long))

where __MACHINEI(X) is defined as X;

so the two declarations should be the same except for the __cdecl. Are you
overriding the default calling convention?


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