linked libraries should be after the source file referencing them

http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
This commit is contained in:
Arnaud Bailly 2019-07-31 14:13:32 +02:00
parent d600a3980c
commit f66d681893
No known key found for this signature in database
GPG Key ID: 389CC2BC5448321E

View File

@ -49,7 +49,7 @@ clean :
test: build test.c
cp $(DYLIBTARGET) lib$(DYLIBTARGET) # to make C linker happy
$(CC) -o network-tests -L. -I. -l$(LIBNAME) test.c
$(CC) -o network-tests -L. -I. test.c -l$(LIBNAME)
LD_LIBRARY_PATH=. ./network-tests
./lib-tests