This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Library error using -lsocket and -lnsl
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Sat, 01 Nov 2003 18:08:49 -0800
- Subject: Re: Library error using -lsocket and -lnsl
- Organization: My own little world...
- References: <Law15-F44fE9oh46Yiu000068ab@hotmail.com>
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/