Boost C++ Libraries: Ticket #2541: Asio not working on windows due to QueueUserAPC missing in global namespace https://svn.boost.org/trac10/ticket/2541 <p> Hi Chris, </p> <p> I just thought I open a ticket here for better handling: The problem has been described by someone else, but I have it too. It's quite simple, although perhaps not the solution. <a class="ext-link" href="http://groups.google.tl/group/boost-list/browse_thread/thread/c19823879d3cdecc"><span class="icon">​</span>http://groups.google.tl/group/boost-list/browse_thread/thread/c19823879d3cdecc</a> </p> <p> Basically, Asio in 1.37 is not compiling on windows. I get the following error: 'QueueUserAPC' : is not a member of 'operator<code></code>global namespace<strong> </strong></p> <p> Greetings and Thanks... </p> <p> Stephan </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2541 Trac 1.4.3 Steven Watanabe Thu, 04 Dec 2008 03:08:32 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2541#comment:1 https://svn.boost.org/trac10/ticket/2541#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">chris_kohlhoff</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">asio</span> </li> </ul> Ticket chris_kohlhoff Sun, 01 Feb 2009 11:56:38 GMT <link>https://svn.boost.org/trac10/ticket/2541#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2541#comment:2</guid> <description> <p> This is due to _WIN32_WINNT not being defined when Windows.h is first included and/or the value of the #define being changed before asio.hpp is included. To work correctly, _WIN32_WINNT should be defined on the compiler command line or in the project options. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 01 Feb 2009 11:57:02 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2541#comment:3 https://svn.boost.org/trac10/ticket/2541#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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/50945" title="Improve warning message when _WIN32_WINNT is not correctly defined. ...">[50945]</a>) Improve warning message when _WIN32_WINNT is not correctly defined. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2541" title="#2541: Bugs: Asio not working on windows due to QueueUserAPC missing in global namespace (closed: fixed)">#2541</a>. </p> Ticket Stephan Menzel <stephan.menzel@…> Tue, 03 Feb 2009 08:59:57 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/2541#comment:4 https://svn.boost.org/trac10/ticket/2541#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Hi Chris, </p> <p> I'm not sure it's that easy. _WIN32_WINNT is set here in the project options (MSVC2005) and never changes it's value within my project as far as I can see. </p> <p> Here's the cmdline options: </p> <p> /Od /I &lt;several includes&gt; /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /D "_WIN32_WINNT" /D "_CRT_SECURE_NO_WARNINGS" /D "BOOST_ALL_DYN_LINK" /D "CMAKE_INTDIR=\"Debug\"" /D "_WINDLL" /D "_MBCS" /FD /EHsc /RTC1 /MDd /Fo"commons.dir\Debug<br />" /W3 /nologo /c /Zi /TP /errorReport:prompt </p> <p> Thanks for caring though! </p> <p> HTH, </p> <p> Stephan </p> Ticket chris_kohlhoff Tue, 03 Feb 2009 09:39:29 GMT <link>https://svn.boost.org/trac10/ticket/2541#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2541#comment:5</guid> <description> <p> You need to make sure you define _WIN32_WINNT to a particular value indicating the target platform. E.g. try changing command line so it has: </p> <blockquote> <p> /D "_WIN32_WINNT=0x501" </p> </blockquote> <p> I have enhanced the warning message emitted by asio to make this clearer (see changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/50945" title="Improve warning message when _WIN32_WINNT is not correctly defined. ...">[50945]</a>). </p> </description> <category>Ticket</category> </item> <item> <author>Stephan Menzel <stephan.menzel@…></author> <pubDate>Tue, 03 Feb 2009 09:47:46 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2541#comment:6 https://svn.boost.org/trac10/ticket/2541#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> OMG, should've known. </p> <p> Works, thank you very much and sorry for the trouble. To hell with windows and all those defines. </p> <p> Cazart, </p> <p> Stephan </p> Ticket chris_kohlhoff Wed, 04 Feb 2009 06:22:51 GMT <link>https://svn.boost.org/trac10/ticket/2541#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2541#comment:7</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51004" title="Merged revisions 50943-50950,50961-50964,50987 via svnmerge from ...">[51004]</a>) Merged revisions 50943-50950,50961-50964,50987 via svnmerge from <a class="ext-link" href="https://svn.boost.org/svn/boost/trunk"><span class="icon">​</span>https://svn.boost.org/svn/boost/trunk</a> </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50943" title="Need to specify socket lib to link correctly on QNX. Fixes #2504. ">r50943</a> | chris_kohlhoff | 2009-02-01 22:37:18 +1100 (Sun, 01 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Need to specify socket lib to link correctly on QNX. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2504" title="#2504: Patches: asio tests need to be linked to socket lib on QNX 6 (closed: fixed)">#2504</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50944" title="Use correct size for IP_MULTICAST_LOOP option on QNX. Fixes #2530. ">r50944</a> | chris_kohlhoff | 2009-02-01 22:42:09 +1100 (Sun, 01 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Use correct size for IP_MULTICAST_LOOP option on QNX. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2530" title="#2530: Patches: Size of data for IP_MULTICAST_LOOP socket option incorrect on QNX 6.4.0 (closed: fixed)">#2530</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50945" title="Improve warning message when _WIN32_WINNT is not correctly defined. ...">r50945</a> | chris_kohlhoff | 2009-02-01 22:57:01 +1100 (Sun, 01 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Improve warning message when _WIN32_WINNT is not correctly defined. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2541" title="#2541: Bugs: Asio not working on windows due to QueueUserAPC missing in global namespace (closed: fixed)">#2541</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50946" title="Suppress unused result warning. Fixes #2534. ">r50946</a> | chris_kohlhoff | 2009-02-01 23:28:12 +1100 (Sun, 01 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Suppress unused result warning. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2534" title="#2534: Bugs: Removing gcc warning (closed: fixed)">#2534</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50947" title="Ensure arguments to windows::overlapped_ptr::complete() are passed ...">r50947</a> | chris_kohlhoff | 2009-02-01 23:41:01 +1100 (Sun, 01 Feb 2009) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure arguments to windows::overlapped_ptr::complete() are passed through to the completion handler. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2614" title="#2614: Bugs: asio overlapped_ptr::complete ignores arguments (closed: fixed)">#2614</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50948" title="Add include of &lt;cstring&gt; to fix a compile error on Solaris 10. Fixes ...">r50948</a> | chris_kohlhoff | 2009-02-01 23:50:08 +1100 (Sun, 01 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Add include of &lt;cstring&gt; to fix a compile error on Solaris 10. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2607" title="#2607: Bugs: asio compilation error on solaris 10 (closed: fixed)">#2607</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50949" title="Clear the last error following a successful Windows API call, since ...">r50949</a> | chris_kohlhoff | 2009-02-02 00:25:05 +1100 (Mon, 02 Feb 2009) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Clear the last error following a successful Windows API call, since some socket providers may leave last error set even when the call succeeds. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50950" title="Fix errors in SSL overview and add a note about handshaking. Fixes ...">r50950</a> | chris_kohlhoff | 2009-02-02 00:42:33 +1100 (Mon, 02 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix errors in SSL overview and add a note about handshaking. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2617" title="#2617: Bugs: SSL overview documentation issues (closed: fixed)">#2617</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2619" title="#2619: Bugs: SSL overview documentation: handshake missing (closed: fixed)">#2619</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50961" title="Use a pipe if eventfd is not supported at runtime. Fixes #2683. ">r50961</a> | chris_kohlhoff | 2009-02-02 17:18:59 +1100 (Mon, 02 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Use a pipe if eventfd is not supported at runtime. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2683" title="#2683: Bugs: eventfd_select_interrupter: Function not implemented (closed: fixed)">#2683</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50962" title="Add link to asio wiki. ">r50962</a> | chris_kohlhoff | 2009-02-02 18:06:00 +1100 (Mon, 02 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Add link to asio wiki. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50963" title="Use the workaround syntax for specifying a return type with ...">r50963</a> | chris_kohlhoff | 2009-02-02 20:36:11 +1100 (Mon, 02 Feb 2009) | 4 lines </p> </blockquote> <p> </p> <blockquote> <p> Use the workaround syntax for specifying a return type with boost::bind. Needed for the SSL support to work on some older compilers (in particular, g++ 3.4.5 as used with MinGW). </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50964" title="Update asio version number. ">r50964</a> | chris_kohlhoff | 2009-02-02 20:37:10 +1100 (Mon, 02 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Update asio version number. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/50987" title="Fix generated documentation where the overloads of a function have ...">r50987</a> | chris_kohlhoff | 2009-02-03 22:00:39 +1100 (Tue, 03 Feb 2009) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix generated documentation where the overloads of a function have different brief descriptions. </p> </blockquote> <p> ........ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 21 May 2009 23:46:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2541#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2541#comment:8</guid> <description> <blockquote class="citation"> <p> You need to make sure you define _WIN32_WINNT to a particular value indicating the &gt; target platform. E.g. try changing command line so it has: </p> <blockquote> <p> /D "_WIN32_WINNT=0x501" </p> </blockquote> </blockquote> <p> Actually /D "_WIN32_WINNT=0x400" (or later) (c) MSDN </p> </description> <category>Ticket</category> </item> </channel> </rss>