Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <41A150AB.4875EB8D@dessent.net>
Date: Sun, 21 Nov 2004 18:36:27 -0800
From: Brian Dessent <brian@dessent.net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: linking programs with  winsock  API - Problems
References: <20041122022150.NEBH2430.imf22aec.mail.bellsouth.net@mail.bellsouth.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

krishna_unf@bellsouth.net wrote:


> I am new to using the winsock programs. I am having problem in creating the runtime binaries using the socket programming with winsock API.
> 
> The error message received on the console is :- cannot find -lwinsock32

If you are compiling a _cygwin_ program and use standard posix socket
functions there is no need for -lanything because all of the socket
functions are handled by the Cygwin DLL.

If you are compiling a mingw application (i.e. you include -mno-cygwin
on your gcc command line) then you will have to add -lws2_32 or
-lwinsock.  However, "winsock32" is not the name of any valid mingw
library so that will not work.

Brian

--
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/

