Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jul 2006 23:15:11 +0100
From:      Xian <ian@codepad.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   can't link against net/Sockets
Message-ID:  <200607022315.11438.ian@codepad.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607022315.11438.ian>