Web lists-archives.com

Re: GCC-6.4 sys/select.h build failures with std=c++14






On 26/09/2017 03:41, Ian Fette wrote:
I tried compiling a very simple program with curl using -std=c++14 under
64-bit cygwin with gcc 6.4.0. When compiling with just g++ main.cpp -lcurl
everything is fine, however if I try to use c++14 as the dialect (g++
main.cpp -lcurl -std=c++14) familiar problems creep up

In file included from /usr/include/curl/curl.h:2547:0,
                  from main.cpp:10:
/usr/include/curl/multi.h:155:40: error: ‘fd_set’ has not been declared
                                         fd_set *read_fd_set,
                                         ^~~~~~
/usr/include/curl/multi.h:156:40: error: ‘fd_set’ has not been declared
                                         fd_set *write_fd_set,
                                         ^~~~~~
/usr/include/curl/multi.h:157:40: error: ‘fd_set’ has not been declared
                                         fd_set *exc_fd_set,
                                         ^~~~~~


This is resolved by manually including <sys/select.h> before including
<curl/curl.h>


this seems more an issue of curl header as from
http://pubs.opengroup.org/onlinepubs/009696899/basedefs/sys/select.h.html

"The <sys/select.h> header shall define the fd_set type as a structure."

so if they are using it, they should have a proper include

Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple