Boost C++ Libraries: Ticket #2660: `fd_set' has not been declared https://svn.boost.org/trac10/ticket/2660 <p> I'm using Boost.Thread and Boost.Asio on Cygwin. </p> <p> If I include boost/thread.hpp, without boost/asio.hpp first, I get a compiler error: </p> <p> In file included from /usr/include/cygwin/sys_time.h:13, </p> <blockquote> <p> from /usr/include/sys/time.h:27, from D:/local/boost/include/boost-1_37/boost/date_time/c_time.hpp:28, from D:/local/boost/include/boost-1_37/boost/date_time/microsec_time_clock.hpp:18, from D:/local/boost/include/boost-1_37/boost/thread/thread_time.hpp:9, from D:/local/boost/include/boost-1_37/boost/thread/locks.hpp:12, from D:/local/boost/include/boost-1_37/boost/thread/pthread/mutex.hpp:11, from D:/local/boost/include/boost-1_37/boost/thread/mutex.hpp:16, from D:/local/boost/include/boost-1_37/boost/thread/pthread/thread_data.hpp:12, from D:/local/boost/include/boost-1_37/boost/thread/thread.hpp:17, from D:/local/boost/include/boost-1_37/boost/thread.hpp:13, from src/flightpath_controller.cpp:27: </p> </blockquote> <p> /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared make: <strong>* [build/flightpath_controller.o] Error 1 </strong></p> <p> A workaround for this issue is to include boost/asio.hpp before boost/thread.hpp within the given sourcefile. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2660 Trac 1.4.3 Steven Watanabe Fri, 16 Jan 2009 18:31:49 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2660#comment:1 https://svn.boost.org/trac10/ticket/2660#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Anthony Williams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> <p> So to be clear, do you get an error from a file that contains only: </p> <pre class="wiki">#include &lt;boost/thread.hpp&gt; </pre> Ticket jens.luedicke@… Wed, 21 Jan 2009 10:06:24 GMT <link>https://svn.boost.org/trac10/ticket/2660#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:1" title="Comment 1">steven_watanabe</a>: </p> <blockquote class="citation"> <p> So to be clear, do you get an error from a file that contains only: </p> <pre class="wiki">#include &lt;boost/thread.hpp&gt; </pre></blockquote> <p> Yes. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sat, 24 Jan 2009 00:10:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2660#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:3</guid> <description> <p> Ok. It works for me. </p> <p> Do you have any compiler flags beyond the absolute minimum: </p> <pre class="wiki">g++ -I D:/local/boost/include/boost-1_37 -c minimal_test_file.cpp </pre><p> Does the code compile if you include sys/select.h only? If so, can you find the closest file in the chain of #includes that causes an error. </p> </description> <category>Ticket</category> </item> <item> <author>Jens Luedicke <jens.luedicke@…></author> <pubDate>Wed, 28 Jan 2009 10:02:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2660#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:3" title="Comment 3">steven_watanabe</a>: </p> <blockquote class="citation"> <p> Ok. It works for me. </p> <p> Do you have any compiler flags beyond the absolute minimum: </p> <pre class="wiki">g++ -I D:/local/boost/include/boost-1_37 -c minimal_test_file.cpp </pre><p> Does the code compile if you include sys/select.h only? If so, can you find the closest file in the chain of #includes that causes an error. </p> </blockquote> <p> Yes, it compiles. </p> <p> If I add "-D<span class="underline">USE_W32_SOCKETS" to the compiler flags, the minimal file fails to compile. </span></p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 29 Jan 2009 02:56:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2660#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:4" title="Comment 4">Jens Luedicke &lt;jens.luedicke@gmail.com&gt;</a>: </p> <blockquote class="citation"> <p> If I add "-D<span class="underline">USE_W32_SOCKETS" to the compiler flags, the minimal file fails to compile. </span></p> </blockquote> <p> Thanks. I can reproduce the problem now. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Fri, 06 Feb 2009 04:18:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2660#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:6</guid> <description> <p> I've just tested sys/select.h by itself and it fails for me. Are you sure that it compiles: </p> <pre class="wiki">$ cat test.cpp #include &lt;sys/select.h&gt; $ g++ test.cpp -c -D__USE_W32_SOCKETS In file included from test.cpp:1: /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:31: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared /usr/include/sys/select.h:33: error: `fd_set' has not been declared </pre> </description> <category>Ticket</category> </item> <item> <author>jens.luedicke@…</author> <pubDate>Wed, 11 Feb 2009 16:29:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2660#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:6" title="Comment 6">steven_watanabe</a>: </p> <blockquote class="citation"> <p> I've just tested sys/select.h by itself and it fails for me. Are you sure that it compiles: </p> </blockquote> <p> As far as I can remeber it does not compile. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 12 Feb 2009 19:26:35 GMT</pubDate> <title>owner, component changed https://svn.boost.org/trac10/ticket/2660#comment:8 https://svn.boost.org/trac10/ticket/2660#comment:8 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">az_sw_dude</span> </li> <li><strong>component</strong> <span class="trac-field-old">thread</span> → <span class="trac-field-new">date_time</span> </li> </ul> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:7" title="Comment 7">jens.luedicke@gmail.com</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:6" title="Comment 6">steven_watanabe</a>: </p> <blockquote class="citation"> <p> I've just tested sys/select.h by itself and it fails for me. Are you sure that it compiles: </p> </blockquote> <p> As far as I can remeber it does not compile. </p> </blockquote> <p> Sorry. I misinterpreted <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:4" title="Comment 4">Yes, it compiles.</a>. </p> <p> This seems to be a cygwin problem rather than a Boost problem as the error is caused by date_time's inclusion of sys/time.h. </p> Ticket anonymous Wed, 11 Mar 2009 15:07:41 GMT <link>https://svn.boost.org/trac10/ticket/2660#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2660#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2660#comment:8" title="Comment 8">steven_watanabe</a>: </p> <blockquote class="citation"> <p> This seems to be a cygwin problem rather than a Boost problem as the error is caused by date_time's inclusion of sys/time.h. </p> </blockquote> <p> Has this been communicated to the Cygwin development folks? </p> </description> <category>Ticket</category> </item> <item> <author>gvenkatsm@…</author> <pubDate>Thu, 19 Nov 2009 09:14:44 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/2660#comment:10 https://svn.boost.org/trac10/ticket/2660#comment:10 <ul> <li><strong>cc</strong> <span class="trac-author">gvenkatsm@…</span> added </li> </ul> <p> It seems direct linking of windows libraries and inclusion of headers is not allowed in cygwin. For details its in the following link. </p> <p> <a class="ext-link" href="http://www.cygwin.com/ml/cygwin/2008-08/msg00133.html"><span class="icon">​</span>http://www.cygwin.com/ml/cygwin/2008-08/msg00133.html</a> </p> Ticket Steven Watanabe Mon, 14 Jun 2010 02:44:16 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2660#comment:11 https://svn.boost.org/trac10/ticket/2660#comment:11 <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">invalid</span> </li> </ul> Ticket Smithg195 Sun, 12 Apr 2015 13:21:53 GMT status, severity, type, component, version, milestone changed; resolution deleted https://svn.boost.org/trac10/ticket/2660#comment:12 https://svn.boost.org/trac10/ticket/2660#comment:12 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Not Applicable</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Library Submissions</span> </li> <li><strong>component</strong> <span class="trac-field-old">date_time</span> → <span class="trac-field-new">xpressive</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost.Build-M3</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.38.0</span> → <span class="trac-field-new">Website 1.X</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> <p> Do you mind if I quote a few of your posts as long as I provide credit and sources back to your weblog? My blog is in the very same niche as yours and my users would truly benefit from a lot of the information you present here. Please let me know if this alright with you. Thank you! bekabcdkbedbckab </p> Ticket