Hi, I am trying to compile a C++ program under Linux 2.0.34 using g++. In that program I include <socket.h> and <pthread.h> and because of that I compile with -lsocket (for the socket library to be included) and -lthread (for the Posix thread library to be included). My linker ld, complains that it can not find the -lsocket file ?!? ; it does say nothing about the -lthread, but the compiler warns me that all the functions from this library are "implicitly declared" which to me means that the corresponding library *.o file was never found. The above program compiles and runs fine under SunOs, but not under Linux. I have attached the Makefile that I am using. Any help would be greatly appreciated, mich
CC=g++ CFLAGS=-g -c LIBS=-lsocket -lnsl -lthread Server = SimpleServer.o ServerDatagramSocket.o Client = SimpleClient.o ReaderThread.o InputHandler.o ClientMulticastSocket.o Common = Socket.o DatagramSocket.o All = $(Server) $(Client) $(Common) server : $(Server) $(Common) $(CC) $(LIBS) -o server $(Server) $(Common) client : $(Client) $(Common) $(CC) $(LIBS) -o client $(Client) $(Common) $(All) : *.C $(CC) -c *.C DatagramSocket.o : Socket.H ClientMulticastSocket.o : Socket.H DatagramSocket.H ServerDatagramSocket.o : Socket.H DatagramSocket.H SimpleClient : ClientMulticastSocket.H InputHandler.H SimpleServer : ServerDatagramSocket.H clean: rm -f $(All) server client *~ core