dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
797 stars 195 forks source link

Fix linking issue in examples/examples++ #54

Closed susumuo closed 6 years ago

susumuo commented 6 years ago

When examples/test.sh tried to compile sample program, it failed by link error.

=== MAKE SURE YOU INSTALLED THE LATEST VERSION AS S/O! === Starting test suite examples/... Testing TCP client/server (transmission*.c)... /tmp/ccIko3cF.o: In function main': transmission_client.c:(.text+0x25): undefined reference tocreate_inet_stream_socket' transmission_client.c:(.text+0x85): undefined reference to `destroy_inet_socket' collect2: error: ld returned 1 exit status

The linker searches object files and libraries in the order they specified. Thus functions in previous object may not be loaded.