Click to See Complete Forum and Search --> : Cannot link with socket libraries


Whipping Boy
05-06-2001, 01:51 AM
I have this line in my Makefile to link the object file with the necessary libraries to produce the executable:

LFLAGS = -L/usr/local/lib/mysql -L/usr/lib -L/usr/local/lib -L/lib -lmysqlclient -lsocket -lnsl -o

And then:
$(CC) $(LFLAGS) ./src/dbsetup/dbsetup ./src/dbsetup/main.o

I know that everything within the Makefile works until it reaches the point where it links with the socket library, at which point it spits out this error message:
/usr/i386-slackware-linux/bin/ld: cannod open -lsocket: No such file or directory


Any suggestions?

jemfinch
05-06-2001, 02:03 AM
I've never had to explicitly link to an socket libraries. Perhaps you should try the command without that option.

Jeremy

Qubit
05-06-2001, 07:20 AM
As far as I know, libsocket only exists on SunOS.