Open yuliswe opened 6 years ago
-ljansson
needs to be moved to the end after the object files. Otherwise the linker won't scan for the library.
This will correctly compile: gcc -O2 -Wall -Wextra -o bdpandl bdpandl.o dlcommon.o dlinfo.o dlpart.o dlscrolling.o dllist.o err_handler.o dlbuffer.o dlssl.o -lcurl -lpthread -I/usr/local/include -L/usr/local/lib -ljansson -lpthread
It looks the automake generated wrong compile command, src/Makefile.am file has a following statement:
bdpandl_LDFLAGS = -Wall -Wextra -lpthread -ljansson.
perhaps something wrong here.