LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /usr/bin/ld: cannot find -lsocket (https://www.linuxquestions.org/questions/linux-newbie-8/usr-bin-ld-cannot-find-lsocket-4175411961/)

thodori 06-17-2012 05:03 PM

/usr/bin/ld: cannot find -lsocket
 
Hi, my name is Ted and I am very much a Linux newbie. Taking a Computer Networking course and am getting /usr/bin/ld: cannot find -lsocket, when I compile. Any input would be appreciated.

knudfl 06-17-2012 06:28 PM

Welcome to LQ.

'lsocket' = libsocket.so or libsocket.a
... Which software are you compiling ? ?


Packages containing libsocket.* , examples :
camsource, libcamsource*, libferris-context_sockets, pfe-forth-devel, ctrlproxy.

http://rpm.pbone.net/ > Search > Advanced Search : libsocket.so

.

thodori 06-18-2012 02:32 PM

I compiling on my universities unix system using:
gcc -o tcpc tcpc.c -lnsl -lsocket

knudfl 06-18-2012 04:11 PM

The libraries "libnsl.so", "libnsl.a" are provided by the main library = libc.
The development package must be installed. (glibc-devel ? libc6-dev ?).

Ask somebody at the university, which "Unix OS" you are using.
Name and version.

Also : It is impossible to guess which libsocket.* it is about.
Please do a search http://rpm.pbone.net/ :
Include all OS, all versions to decide the required library.

.


All times are GMT -5. The time now is 03:17 PM.