Boost C++ Libraries: Ticket #5791: (MinGW) fail to compile asio when c++0x enabled https://svn.boost.org/trac10/ticket/5791 <p> After including &lt;boost/asio.hpp&gt; I got the error: <br /> </p> <p> boost_1_47_0/boost/asio/detail/impl/win_static_mutex.ipp:51:63: error: 'swprintf' was not declared in this scope <br /> </p> <p> Without -std=c++0x, it compiles fine, I use g++4.5.2/MinGW on XP SP3.<br /> This causal file seems to be shipped with the new signal_set feature. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5791 Trac 1.4.3 MKP Sun, 21 Aug 2011 17:47:43 GMT <link>https://svn.boost.org/trac10/ticket/5791#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5791#comment:1</guid> <description> <p> Use <em>-std=gnu++0x</em> flag instead of <em>-std=c++0x</em> and it should work. </p> </description> <category>Ticket</category> </item> <item> <author>Jamboree <tongari95@…></author> <pubDate>Sun, 21 Aug 2011 18:54:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5791#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5791#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/5791#comment:1" title="Comment 1">MKP</a>: </p> <blockquote class="citation"> <p> Use <em>-std=gnu++0x</em> flag instead of <em>-std=c++0x</em> and it should work. </p> </blockquote> <p> Indeed. Thanks for the tip. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Tue, 29 May 2012 01:56:29 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5791#comment:3 https://svn.boost.org/trac10/ticket/5791#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">wontfix</span> </li> </ul> <p> I have no plans to change any code for this as it appears to be a MinGW bug, and -std=gnu++0x may be used as a workaround. </p> Ticket christoffer.green@… Mon, 14 Jan 2013 08:40:44 GMT <link>https://svn.boost.org/trac10/ticket/5791#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5791#comment:4</guid> <description> <p> Since this page comes up on google for people that have this problem there is a better way to solve it other then using -std=gnu++0x. Continue using -std=c++11 or -std=c++0x but add -U<span class="underline">STRICT_ANSI</span> since the problem is that -std=c++11 defines the strict ansi stuff, and the workaround -std=gnu++0x does not define it. So we solve it by simply undefining it. </p> </description> <category>Ticket</category> </item> </channel> </rss>