Boost C++ Libraries: Ticket #12927: Conflicting types for 'InitializeCriticalSection' https://svn.boost.org/trac10/ticket/12927 <p> When compiling with Visual C++ 2017 Clang/C2 v141_clang_c2 toolset, the following code produces "fatal error : conflicting types for <a class="missing wiki">InitializeCriticalSection</a>": </p> <pre class="wiki"> #include &lt;windows.h&gt; #include &lt;boost/math/special_functions/bernoulli.hpp&gt; </pre><p> The error happens at line 52 in </p> <p> <a href="http://www.boost.org/doc/libs/1_63_0/boost/smart_ptr/detail/lwm_win32_cs.hpp">http://www.boost.org/doc/libs/1_63_0/boost/smart_ptr/detail/lwm_win32_cs.hpp</a> </p> <p> which reads </p> <pre class="wiki">extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *); </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12927 Trac 1.4.3 John Maddock Sun, 16 Apr 2017 08:47:10 GMT component changed; owner set https://svn.boost.org/trac10/ticket/12927#comment:1 https://svn.boost.org/trac10/ticket/12927#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Peter Dimov</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">smart_ptr</span> </li> </ul> Ticket Peter Dimov Sun, 16 Apr 2017 22:07:50 GMT <link>https://svn.boost.org/trac10/ticket/12927#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12927#comment:2</guid> <description> <p> This should be fixed in <a class="ext-link" href="https://github.com/boostorg/smart_ptr/commit/3568e093bb42da2dcf050c659bb5cbb86acdfbd3"><span class="icon">​</span>https://github.com/boostorg/smart_ptr/commit/3568e093bb42da2dcf050c659bb5cbb86acdfbd3</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Mon, 24 Apr 2017 17:17:48 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12927#comment:3 https://svn.boost.org/trac10/ticket/12927#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Merged to master in <a class="ext-link" href="https://github.com/boostorg/smart_ptr/commit/7ef8fa4a19bac256ec3c8d9588d49f5df5a74269"><span class="icon">​</span>https://github.com/boostorg/smart_ptr/commit/7ef8fa4a19bac256ec3c8d9588d49f5df5a74269</a> </p> Ticket