Boost C++ Libraries: Ticket #4678: VS2010 intrin.h not compatible with interlocked.hpp https://svn.boost.org/trac10/ticket/4678 <p> A customer has openned an <a class="ext-link" href="http://connect.microsoft.com/VisualStudio/feedback/details/584418/different-intrinsic-functions-are-declared-with-different-calling-conventions"><span class="icon">​</span>Micrsoft Connect</a> bug for the compatibility of VS2010 and Boost. The user states that including intrin.h and boost\detail\interlocked.hpp whiling passing fastcall or stdcall switch to the compiler, the compiler would generate an redefinition error. </p> <pre class="wiki">d:\boost\boost_1_44_0\boost\detail\interlocked.hpp(61): error C2373: '_InterlockedCompareExchange' : redefinition; different type modifiers c:\program files (x86)\microsoft visual studio 10.0\vc\include\intrin.h(214) : see declaration of '_InterlockedCompareExchange' </pre><p> In VS2010, intrin.h has changed to match calling convention that of <a class="missing wiki">WinBase</a>.h. </p> <p> Would defining BOOST_USE_WINDOWS_H workaround the issue? </p> <p> Thanks </p> <p> Felix </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4678 Trac 1.4.3 Ion Gaztañaga Fri, 01 Apr 2011 19:08:29 GMT owner changed https://svn.boost.org/trac10/ticket/4678#comment:1 https://svn.boost.org/trac10/ticket/4678#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Ion Gaztañaga</span> to <span class="trac-author">Peter Dimov</span> </li> </ul> <p> Reasigning to Peter Divmo, author of interlocked.hpp </p> Ticket Peter Dimov Fri, 01 Apr 2011 20:25:25 GMT status, component changed https://svn.boost.org/trac10/ticket/4678#comment:2 https://svn.boost.org/trac10/ticket/4678#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>component</strong> <span class="trac-field-old">interprocess</span> → <span class="trac-field-new">smart_ptr</span> </li> </ul> Ticket Peter Dimov Mon, 07 Nov 2011 23:08:55 GMT <link>https://svn.boost.org/trac10/ticket/4678#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4678#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75396" title="Use &lt;intrin.h&gt; for VS2010+. Refs #4678.">[75396]</a>) Use &lt;intrin.h&gt; for VS2010+. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4678" title="#4678: Bugs: VS2010 intrin.h not compatible with interlocked.hpp (closed: fixed)">#4678</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 30 Nov 2011 18:08:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4678#comment:4 https://svn.boost.org/trac10/ticket/4678#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75757" title="Merge [75396] to release. Fixes #4678.">[75757]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/75396" title="Use &lt;intrin.h&gt; for VS2010+. Refs #4678.">[75396]</a> to release. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4678" title="#4678: Bugs: VS2010 intrin.h not compatible with interlocked.hpp (closed: fixed)">#4678</a>. </p> Ticket