delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/21/21:33:20

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

krishna_unf AT bellsouth DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019