Open bignmllc opened 2 years ago
Creates the following problems with gcc v9:
./build.sh /tmp/ccpXA2pb.o: In function run_client()': dgram_over_stream.cpp:(.text+0x266): undefined reference tolibsocket::inet_stream::inet_stream(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' dgram_over_stream.cpp:(.text+0x27e): undefined reference to libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x2a6): undefined reference tolibsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x2c1): undefined reference to libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x2d8): undefined reference tolibsocket::dgram_over_stream::sndmsg(void const, unsigned long)' dgram_over_stream.cpp:(.text+0x301): undefined reference to `libsocket::dgram_over_stream::rcvmsg(void, unsigned long)' dgram_over_stream.cpp:(.text+0x408): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionrun_string_client()': dgram_over_stream.cpp:(.text+0x4b6): undefined reference to libsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x4d4): undefined reference tolibsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x4fc): undefined reference to libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x51c): undefined reference tolibsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x57a): undefined reference to libsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0x5af): undefined reference tolibsocket::dgram_over_stream::rcvmsg(std::cxx11::basic_string<char, std::char_traits, std::allocator >)' dgram_over_stream.cpp:(.text+0x69d): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionrun_server()': dgram_over_stream.cpp:(.text+0x76a): undefined reference to libsocket::inet_stream_server::inet_stream_server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x77d): undefined reference tolibsocket::inet_stream_server::accept(int, int)' dgram_over_stream.cpp:(.text+0x794): undefined reference to libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x7bc): undefined reference tolibsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x7d7): undefined reference to libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x800): undefined reference tolibsocket::dgram_over_stream::rcvmsg(void, unsigned long)' dgram_over_stream.cpp:(.text+0x8ba): undefined reference to libsocket::dgram_over_stream::sndmsg(void const*, unsigned long)' /tmp/ccpXA2pb.o: In functionrun_vec_client()': dgram_over_stream.cpp:(.text+0x974): undefined reference to libsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x992): undefined reference tolibsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x9bd): undefined reference to libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x9d9): undefined reference tolibsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0xa31): undefined reference to libsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0xa66): undefined reference tolibsocket::dgram_over_stream::rcvmsg(std::vector<unsigned char, std::allocator >)' dgram_over_stream.cpp:(.text+0xb76): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionlibsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD1Ev[_ZN9libsocket20stream_client_socketD1Ev]+0x13): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionvirtual thunk to libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD1Ev[_ZN9libsocket20stream_client_socketD1Ev]+0x3a): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionlibsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD0Ev[_ZN9libsocket20stream_client_socketD0Ev]+0x18): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In functionvirtual thunk to libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD0Ev[_ZN9libsocket20stream_client_socketD0Ev]+0x4e): undefined reference to libsocket::socket::~socket()' /tmp/ccpXA2pb.o:dgram_over_stream.cpp:(.text._ZN9libsocket11inet_streamD0Ev[_ZN9libsocket11inet_streamD0Ev]+0x4e): more undefined references tolibsocket::socket::~socket()' follow /tmp/ccpXA2pb.o:(.rodata._ZTIN9libsocket20stream_client_socketE[_ZTIN9libsocket20stream_client_socketE]+0x18): undefined reference to typeinfo for libsocket::socket' /tmp/ccpXA2pb.o:(.rodata._ZTIN9libsocket11inet_socketE[_ZTIN9libsocket11inet_socketE]+0x18): undefined reference totypeinfo for libsocket::socket' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket20stream_client_socketE[_ZTVN9libsocket20stream_client_socketE]+0x58): undefined reference to libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket11inet_streamE80_NS_20stream_client_socketE[_ZTVN9libsocket11inet_streamE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket11inet_streamE0_NS_11inet_socketE[_ZTVN9libsocket11inet_streamE]+0x58): undefined reference to libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket11inet_streamE[_ZTVN9libsocket11inet_streamE]+0x80): undefined reference tolibsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket18inet_stream_serverE0_NS_11inet_socketE[_ZTVN9libsocket18inet_stream_serverE]+0x58): undefined reference to libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket18inet_stream_serverE[_ZTVN9libsocket18inet_stream_serverE]+0x58): more undefined references tolibsocket::socket::destroy()' follow collect2: error: ld returned 1 exit status /tmp/cc3potW2.o: In function main': framing.cpp:(.text.startup+0x2b): undefined reference tolibsocket::encode_uint32(unsigned int, char)' framing.cpp:(.text.startup+0x35): undefined reference to libsocket::decode_uint32(char const*)' collect2: error: ld returned 1 exit status /tmp/ccUUZQym.o: In functionlibsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0x37): undefined reference to libsocket::socket::~socket()' /tmp/ccUUZQym.o: In functionnon-virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0x77): undefined reference to libsocket::socket::~socket()' /tmp/ccUUZQym.o: In functionvirtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0xbe): undefined reference to libsocket::socket::~socket()' /tmp/ccUUZQym.o: In functionnon-virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0x40): undefined reference to libsocket::socket::~socket()' /tmp/ccUUZQym.o: In functionvirtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0xa2): undefined reference to libsocket::socket::~socket()' /tmp/ccUUZQym.o:unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0xfb): more undefined references tolibsocket::socket::~socket()' follow /tmp/ccUUZQym.o: In function main': unix_dgram_syslogclient.cpp:(.text.startup+0x61): undefined reference tolibsocket::unix_dgram_client::unix_dgram_client(int)' unix_dgram_syslogclient.cpp:(.text.startup+0x75): undefined reference to `libsocket::unix_dgram::sndto(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' unix_dgram_syslogclient.cpp:(.text.startup+0x7f): undefined reference to libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTIN9libsocket19dgram_client_socketE[_ZTIN9libsocket19dgram_client_socketE]+0x18): undefined reference totypeinfo for libsocket::socket' /tmp/ccUUZQym.o:(.rodata._ZTIN9libsocket11unix_socketE[_ZTIN9libsocket11unix_socketE]+0x18): undefined reference to typeinfo for libsocket::socket' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE40_NS_19dgram_client_socketE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE0_NS_11unix_socketE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference to libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE0_NS_10unix_dgramE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTVN9libsocket17unix_dgram_clientE[_ZTVN9libsocket17unix_dgram_clientE]+0x80): undefined reference to `libsocket::socket::destroy()' collect2: error: ld returned 1 exit status
run_client()': dgram_over_stream.cpp:(.text+0x266): undefined reference to
libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x2a6): undefined reference to
libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x2d8): undefined reference to
libsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
libsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x4d4): undefined reference to
libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x51c): undefined reference to
libsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0x5af): undefined reference to
libsocket::inet_stream_server::inet_stream_server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x77d): undefined reference to
libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x7bc): undefined reference to
libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x800): undefined reference to
libsocket::dgram_over_stream::sndmsg(void const*, unsigned long)' /tmp/ccpXA2pb.o: In function
libsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x992): undefined reference to
libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x9d9): undefined reference to
libsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0xa66): undefined reference to
libsocket::socket::~socket()' /tmp/ccpXA2pb.o:dgram_over_stream.cpp:(.text._ZN9libsocket11inet_streamD0Ev[_ZN9libsocket11inet_streamD0Ev]+0x4e): more undefined references to
typeinfo for libsocket::socket' /tmp/ccpXA2pb.o:(.rodata._ZTIN9libsocket11inet_socketE[_ZTIN9libsocket11inet_socketE]+0x18): undefined reference to
libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket11inet_streamE80_NS_20stream_client_socketE[_ZTVN9libsocket11inet_streamE]+0x58): undefined reference to
libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket11inet_streamE[_ZTVN9libsocket11inet_streamE]+0x80): undefined reference to
libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket18inet_stream_serverE[_ZTVN9libsocket18inet_stream_serverE]+0x58): more undefined references to
main': framing.cpp:(.text.startup+0x2b): undefined reference to
libsocket::decode_uint32(char const*)' collect2: error: ld returned 1 exit status /tmp/ccUUZQym.o: In function
libsocket::socket::~socket()' /tmp/ccUUZQym.o: In function
libsocket::socket::~socket()' /tmp/ccUUZQym.o:unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0xfb): more undefined references to
main': unix_dgram_syslogclient.cpp:(.text.startup+0x61): undefined reference to
libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTIN9libsocket19dgram_client_socketE[_ZTIN9libsocket19dgram_client_socketE]+0x18): undefined reference to
typeinfo for libsocket::socket' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE40_NS_19dgram_client_socketE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference to
libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE0_NS_10unix_dgramE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference to
Fix: Put the -lsocket++ at the end of the g++ compiler lines, not in front of the source names.
Creates the following problems with gcc v9:
./build.sh /tmp/ccpXA2pb.o: In function, std::allocator > const&, std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)'
dgram_over_stream.cpp:(.text+0x27e): undefined reference to , std::allocator >)'
dgram_over_stream.cpp:(.text+0x69d): undefined reference to >)'
dgram_over_stream.cpp:(.text+0xb76): undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)'
unix_dgram_syslogclient.cpp:(.text.startup+0x7f): undefined reference to
run_client()': dgram_over_stream.cpp:(.text+0x266): undefined reference to
libsocket::inet_stream::inet_stream(std::cxx11::basic_string<char, std::char_traitslibsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x2a6): undefined reference to
libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x2c1): undefined reference tolibsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x2d8): undefined reference to
libsocket::dgram_over_stream::sndmsg(void const, unsigned long)' dgram_over_stream.cpp:(.text+0x301): undefined reference to `libsocket::dgram_over_stream::rcvmsg(void, unsigned long)' dgram_over_stream.cpp:(.text+0x408): undefined reference tolibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
run_string_client()': dgram_over_stream.cpp:(.text+0x4b6): undefined reference tolibsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x4d4): undefined reference to
libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x4fc): undefined reference tolibsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x51c): undefined reference to
libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x57a): undefined reference tolibsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0x5af): undefined reference to
libsocket::dgram_over_stream::rcvmsg(std::cxx11::basic_string<char, std::char_traitslibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
run_server()': dgram_over_stream.cpp:(.text+0x76a): undefined reference tolibsocket::inet_stream_server::inet_stream_server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x77d): undefined reference to
libsocket::inet_stream_server::accept(int, int)' dgram_over_stream.cpp:(.text+0x794): undefined reference tolibsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x7bc): undefined reference to
libsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x7d7): undefined reference tolibsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0x800): undefined reference to
libsocket::dgram_over_stream::rcvmsg(void, unsigned long)' dgram_over_stream.cpp:(.text+0x8ba): undefined reference tolibsocket::dgram_over_stream::sndmsg(void const*, unsigned long)' /tmp/ccpXA2pb.o: In function
run_vec_client()': dgram_over_stream.cpp:(.text+0x974): undefined reference tolibsocket::inet_stream::inet_stream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' dgram_over_stream.cpp:(.text+0x992): undefined reference to
libsocket::socket::socket(libsocket::socket&&)' dgram_over_stream.cpp:(.text+0x9bd): undefined reference tolibsocket::dgram_over_stream::dgram_over_stream(libsocket::stream_client_socket)' dgram_over_stream.cpp:(.text+0x9d9): undefined reference to
libsocket::socket::~socket()' dgram_over_stream.cpp:(.text+0xa31): undefined reference tolibsocket::dgram_over_stream::sndmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' dgram_over_stream.cpp:(.text+0xa66): undefined reference to
libsocket::dgram_over_stream::rcvmsg(std::vector<unsigned char, std::allocatorlibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD1Ev[_ZN9libsocket20stream_client_socketD1Ev]+0x13): undefined reference tolibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
virtual thunk to libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD1Ev[_ZN9libsocket20stream_client_socketD1Ev]+0x3a): undefined reference tolibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD0Ev[_ZN9libsocket20stream_client_socketD0Ev]+0x18): undefined reference tolibsocket::socket::~socket()' /tmp/ccpXA2pb.o: In function
virtual thunk to libsocket::stream_client_socket::~stream_client_socket()': dgram_over_stream.cpp:(.text._ZN9libsocket20stream_client_socketD0Ev[_ZN9libsocket20stream_client_socketD0Ev]+0x4e): undefined reference tolibsocket::socket::~socket()' /tmp/ccpXA2pb.o:dgram_over_stream.cpp:(.text._ZN9libsocket11inet_streamD0Ev[_ZN9libsocket11inet_streamD0Ev]+0x4e): more undefined references to
libsocket::socket::~socket()' follow /tmp/ccpXA2pb.o:(.rodata._ZTIN9libsocket20stream_client_socketE[_ZTIN9libsocket20stream_client_socketE]+0x18): undefined reference totypeinfo for libsocket::socket' /tmp/ccpXA2pb.o:(.rodata._ZTIN9libsocket11inet_socketE[_ZTIN9libsocket11inet_socketE]+0x18): undefined reference to
typeinfo for libsocket::socket' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket20stream_client_socketE[_ZTVN9libsocket20stream_client_socketE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket11inet_streamE80_NS_20stream_client_socketE[_ZTVN9libsocket11inet_streamE]+0x58): undefined reference to
libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket11inet_streamE0_NS_11inet_socketE[_ZTVN9libsocket11inet_streamE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket11inet_streamE[_ZTVN9libsocket11inet_streamE]+0x80): undefined reference to
libsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTCN9libsocket18inet_stream_serverE0_NS_11inet_socketE[_ZTVN9libsocket18inet_stream_serverE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccpXA2pb.o:(.rodata._ZTVN9libsocket18inet_stream_serverE[_ZTVN9libsocket18inet_stream_serverE]+0x58): more undefined references to
libsocket::socket::destroy()' follow collect2: error: ld returned 1 exit status /tmp/cc3potW2.o: In functionmain': framing.cpp:(.text.startup+0x2b): undefined reference to
libsocket::encode_uint32(unsigned int, char)' framing.cpp:(.text.startup+0x35): undefined reference tolibsocket::decode_uint32(char const*)' collect2: error: ld returned 1 exit status /tmp/ccUUZQym.o: In function
libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0x37): undefined reference tolibsocket::socket::~socket()' /tmp/ccUUZQym.o: In function
non-virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0x77): undefined reference tolibsocket::socket::~socket()' /tmp/ccUUZQym.o: In function
virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD1Ev[_ZN9libsocket17unix_dgram_clientD1Ev]+0xbe): undefined reference tolibsocket::socket::~socket()' /tmp/ccUUZQym.o: In function
non-virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0x40): undefined reference tolibsocket::socket::~socket()' /tmp/ccUUZQym.o: In function
virtual thunk to libsocket::unix_dgram_client::~unix_dgram_client()': unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0xa2): undefined reference tolibsocket::socket::~socket()' /tmp/ccUUZQym.o:unix_dgram_syslogclient.cpp:(.text._ZN9libsocket17unix_dgram_clientD0Ev[_ZN9libsocket17unix_dgram_clientD0Ev]+0xfb): more undefined references to
libsocket::socket::~socket()' follow /tmp/ccUUZQym.o: In functionmain': unix_dgram_syslogclient.cpp:(.text.startup+0x61): undefined reference to
libsocket::unix_dgram_client::unix_dgram_client(int)' unix_dgram_syslogclient.cpp:(.text.startup+0x75): undefined reference to `libsocket::unix_dgram::sndto(std::libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTIN9libsocket19dgram_client_socketE[_ZTIN9libsocket19dgram_client_socketE]+0x18): undefined reference to
typeinfo for libsocket::socket' /tmp/ccUUZQym.o:(.rodata._ZTIN9libsocket11unix_socketE[_ZTIN9libsocket11unix_socketE]+0x18): undefined reference totypeinfo for libsocket::socket' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE40_NS_19dgram_client_socketE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference to
libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE0_NS_11unix_socketE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference tolibsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTCN9libsocket17unix_dgram_clientE0_NS_10unix_dgramE[_ZTVN9libsocket17unix_dgram_clientE]+0x58): undefined reference to
libsocket::socket::destroy()' /tmp/ccUUZQym.o:(.rodata._ZTVN9libsocket17unix_dgram_clientE[_ZTVN9libsocket17unix_dgram_clientE]+0x80): undefined reference to `libsocket::socket::destroy()' collect2: error: ld returned 1 exit statusFix: Put the -lsocket++ at the end of the g++ compiler lines, not in front of the source names.