X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <485A8725.9030202@cs.cmu.edu> Date: Thu, 19 Jun 2008 12:19:49 -0400 From: Lisa Anthony User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: gcc AT gcc DOT gnu DOT org, cygwin AT cygwin DOT com Subject: question about cygwin C++ sockets Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/