目前,我正在为 Raspberry Pi 修改 C 应用程序。我使用以下命令构建应用程序:
make
现在我想使用libconfig库。我有以下问题
pi@raspberrypi ~/yyyyy $ make
make --no-print-directory all-am
CC tools/xxxxx.o
CCLD tools/xxxxx
tools/xxxxx.c:2434: undefined reference to `config_read_file'
tools/xxxxx.c:2441: undefined reference to `config_lookup_string'
tools/xxxxx.c:2446: undefined reference to `config_destroy'
tools/xxxxx.c:2436: undefined reference to `config_destroy'
在libconfig 手册中,他们说:
要与库链接,请将“-lconfig”指定为链接器的参数。
如何与make
命令链接?