can't link against net/Sockets
Xian
ian at codepad.net
Sun Jul 2 22:15:22 UTC 2006
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
More information about the freebsd-questions
mailing list