* Library error using -lsocket and -lnsl
@ 2003-11-01 20:17 David Moy
2003-11-02 2:08 ` Brian Dessent
0 siblings, 1 reply; 2+ messages in thread
From: David Moy @ 2003-11-01 20:17 UTC (permalink / raw)
To: cygwin
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
_________________________________________________________________
See when your friends are online with MSN Messenger 6.0. Download it now
FREE! http://msnmessenger-download.com
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Library error using -lsocket and -lnsl
2003-11-01 20:17 Library error using -lsocket and -lnsl David Moy
@ 2003-11-02 2:08 ` Brian Dessent
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dessent @ 2003-11-02 2:08 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-02 2:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-01 20:17 Library error using -lsocket and -lnsl David Moy
2003-11-02 2:08 ` Brian Dessent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).