public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* question about cygwin C++ sockets
@ 2008-06-19 16:54 Lisa Anthony
  0 siblings, 0 replies; only message in thread
From: Lisa Anthony @ 2008-06-19 16:54 UTC (permalink / raw)
  To: gcc, cygwin

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-19 16:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-19 16:54 question about cygwin C++ sockets Lisa Anthony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).