Opened 13 years ago
Closed 13 years ago
#3378 closed Bugs (fixed)
interlocked.hpp won't compile
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | Boost 1.41.0 | Component: | math |
Version: | Boost 1.39.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Suddenly and for no discernible reason, merely including any (I assume) boost header file produces the compiler errors below. I was including only boost/math/distributions/binomial.hpp when the problem arose. I tested #include<boost/signal.hpp> alone as well, producing the same errors. Nothing in my own code changed (backup copies that compiled when they were saved won't compile now). I tried rerunning the boostpro installer, but it had no effect. I'm using Visual Studio 2008.
1>C:\Program Files\boost\boost_1_39\boost/detail/interlocked.hpp(57) : error C2373: '_InterlockedIncrement' : redefinition; different type modifiers 1> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\memory(993) : see declaration of '_InterlockedIncrement' 1>C:\Program Files\boost\boost_1_39\boost/detail/interlocked.hpp(58) : error C2373: '_InterlockedDecrement' : redefinition; different type modifiers 1> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\memory(994) : see declaration of '_InterlockedDecrement' 1>C:\Program Files\boost\boost_1_39\boost/detail/interlocked.hpp(59) : error C2373: '_InterlockedCompareExchange' : redefinition; different type modifiers 1> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\memory(995) : see declaration of '_InterlockedCompareExchange' 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(73) : error C3861: '_InterlockedIncrement': identifier not found 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(92) : error C2446: '==' : no conversion from 'long' to 'long (clrcall *)(volatile long *,long,long)' 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(92) : error C2040: '==' : 'long (clrcall *)(volatile long *,long,long)' differs in levels of indirection from 'long' 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(92) : error C3861: '_InterlockedCompareExchange': identifier not found 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(100) : error C3861: '_InterlockedDecrement': identifier not found 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(109) : error C3861: '_InterlockedIncrement': identifier not found 1>C:\Program Files\boost\boost_1_39\boost/smart_ptr/detail/sp_counted_base_w32.hpp(114) : error C3861: '_InterlockedDecrement': identifier not found
Change History (5)
comment:1 by , 13 years ago
Owner: | changed from | to
---|
comment:2 by , 13 years ago
I still have no idea what changed, but adding #define BOOST_USE_WINDOWS_H solves the problem.
comment:3 by , 13 years ago
Status: | new → assigned |
---|
Are you compiling with /clr? The only difference I see between the declarations in interlocked.hpp and <memory> is that <memory> uses clrcall when _M_CEE_PURE is defined, cdecl if not (see yvals.h:53).
comment:4 by , 13 years ago
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
No idea, _something_ must have changed. I can't find any similar reports anywhere on the mailing list or in the Trac, so I'm reassigning to interlocked.hpp's author.