On 07/04/13 19:01 +0800, hasib shaikh said ...
> 
> #gcc talker.c -o talker -lsocket
> /usr/bin/ld: cannot find -lsocket

-lsocket is not necessary on Linux.  IIRC, it is necessary on Solaris.
Compile your program as "gcc talker.c -o talker" and you should be good.

> #gcc talker.c -o talker -libsocket
> /usr/bin/ld: cannot find -libsocket
> collect2: ld returned 1 exit status

This usage is incorrect.  If you were to require a library named <foo>,
you would typically use -l<foo> -L/path/to/dir and not -lib<foo>.

Giridhar

-- 
Y Giridhar Appaji Nag | http://www.appaji.net/


[Non-text portions of this message have been removed]

Reply via email to