From owner-freebsd-questions@FreeBSD.ORG Sun Jul 2 22:15:22 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23EE616A416 for ; Sun, 2 Jul 2006 22:15:22 +0000 (UTC) (envelope-from ian@codepad.net) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BE4243D49 for ; Sun, 2 Jul 2006 22:15:21 +0000 (GMT) (envelope-from ian@codepad.net) Received: from [80.229.159.44] (helo=[192.168.0.4]) by ptb-relay03.plus.net with esmtp (Exim) id 1FxADn-0005bx-Rd for freebsd-questions@freebsd.org; Sun, 02 Jul 2006 23:15:20 +0100 From: Xian To: FreeBSD Questions Date: Sun, 2 Jul 2006 23:15:11 +0100 User-Agent: KMail/1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607022315.11438.ian@codepad.net> Subject: can't link against net/Sockets X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 22:15:22 -0000 I've just installed /usr/ports/net/Sockets and cant link against libSockets that it produced. Having fetched a some of the demo files from http://www.alhem.net/Sockets/tutorial/ I then try to compile: c++ -O2 -fno-strict-aliasing -pipe -march=athlon-xp -g -I/usr/local/include/Sockets -c DisplaySocket.cpp c++ -O2 -fno-strict-aliasing -pipe -march=athlon-xp -g -I/usr/local/include/Sockets -c displayserver.cpp c++ -O2 -fno-strict-aliasing -pipe -march=athlon-xp -g -I/usr/local/include/Sockets -L/usr/local/lib -lpthread -lSockets -lSocketsEx -pthread -o displayserver DisplaySocket.o displayserver.o DisplaySocket.o(.text+0x15): In function `DisplaySocket::DisplaySocket(SocketHandler&)': /home/ian/devel/snake/server/test/DisplaySocket.cpp:8: undefined reference to `TcpSocket::TcpSocket(SocketHandler&)' DisplaySocket.o(.text+0x45): In function `DisplaySocket::DisplaySocket(SocketHandler&)': /home/ian/devel/snake/server/test/DisplaySocket.cpp:8: undefined reference to `TcpSocket::TcpSocket(SocketHandler&) And a lot more similar errors. It looks like it can't find libSockets, is this right? Why not? How do I make it work. ll /usr/local/lib/libSockets* -r--r--r-- 1 root wheel 2.8M Jul 1 11:04 /usr/local/lib/libSockets.a -r--r--r-- 1 root wheel 514K Jul 1 11:04 /usr/local/lib/libSocketsEx.a Any help much appreciated. -- /Xian "We the willing, led by the unknowing, are doing the impossible for the ungrateful. We have done so much for so long with so little, we can do anything with nothing." Unknown author