I have an application I've been working on for a couple years now that
uses this C++ socket library: http://www.alhem.net/Sockets/index.html.
I recently decided to try upgrading the sockets library I had to the
latest one, and have been having conflict problems with building my app
with the new library, which now depends on the winsock32 library. I am
unable to build my app now, because cygwin's implementation of the
gethostname function conflicts with winsock's:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:635:
error: declaration of C function `int gethostname(char*, int)' conflicts
with /usr/include/sys/unistd.h:206: error: previous declaration `int
gethostname(char*, size_t)' here
I found this message, and was wondering if the OP's suggestion has been
addressed or included in later versions of cygwin gcc? (I'm guessing no.)
http://gcc.gnu.org/ml/gcc/2006-05/msg00627.html
It was quite a while ago, but I'm having the same problem as the OP
describes, with recent releases of cygwin and gcc (the version included
in the current cygwin distro).
Compiling with the -mno-cygwin flag (recommended by the socket library
author) gives me different errors (can't find pthread.h).
Any input would be appreciated,
Thanks,
*Lisa
--
*Lisa Anthony
PhD Candidate
http://www.cs.cmu.edu/~lanthony/
Human-Computer Interaction Institute
Carnegie Mellon University, Pittsburgh, PA
"The best way to predict the future is to invent it."
Alan Kay