我正在尝试制作一个使用 mbedtls 的程序,但我无法让 gcc 命令正常工作。
main.c
thpool.c
thpool.h
mbedtls[Folder]
all the .h files of mbedtls
library[Folder]
all the .c and .o files of mbedtls
我目前用命令编译这个程序..
gcc main.c thpool.c -pthread -o main
但由于我添加了一个 mbedtls 函数和代码,它给了我错误..
/usr/bin/ld: /tmp/ccNV32fk.o: in function `p':
main.c:(.text+0x105): undefined reference to `mbedtls_aes_setkey_enc'
collect2: error: ld returned 1 exit status
我不确定如何正确链接这些其他文件。