delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/01/21:09:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: <3FA46731.218C9A4B@dessent.net>
Date: Sat, 01 Nov 2003 18:08:49 -0800
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
X-Accept-Language: en,en-US
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Library error using -lsocket and -lnsl
References: <Law15-F44fE9oh46Yiu000068ab AT hotmail DOT com>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - host.linuxsv3.net
X-AntiAbuse: Original Domain - cygwin.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - dessent.net
Note-from-DJ: This may be spam

David Moy wrote:
> 
> I'm trying to compile a C file but I get an error when using options
> -lsocket and -lnsl. How do I fix this?
> 
> $ gcc client.c -o client -lnsl -lsocket
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
> cannot
> find -lnsl
> collect2: ld returned 1 exit status

AFAIK, all of the socket functions are provided by the standard Cygwin
compatibility layer, i.e. cygwin1.dll.  There is no libnsl or libsocket
in Cygwin.  Try simply "gcc client.c -o client" and see if that works.

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