error when using boost with visual c++
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? I'm including the
following files in the file that is indicating the error:
#include <vector>
#include
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?
Hi: Yes I changed the projects calling convension to stdcall. Cheers Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Peter Dimov Sent: 28 February 2009 21:58 To: boost-users@lists.boost.org Subject: Re: [Boost-users] error when using boost with visual c++ 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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 3896 (20090228) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3896 (20090228) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
Sean Farrow:
Hi: Yes I changed the projects calling convension to stdcall.
It seems that lines 59, 60, 61, 71 and 72 in interlocked.hpp should not have __cdecl (but 57 and 58 do need it). You may try removing the __cdecl from these lines in your local copy of Boost and see if it helps.
participants (2)
-
Peter Dimov
-
Sean Farrow