试图编译 gnutls 示例。x509 客户端在编译时显示错误。
gcc ex-client-x509.c -o ex-client-x509 -lgnutls
错误 :
anupam_on@HP530Notebook:~/Dev/gnutls-3.3.9/doc/examples$ gcc ex-client-x509.c -o ex-client-x509 -lgnutls
/tmp/cc0Nmw0a.o: In function `main':
ex-client-x509.c:(.text+0x103): undefined reference to `tcp_connect'
ex-client-x509.c:(.text+0x34f): undefined reference to `tcp_close'
collect2: error: ld returned 1 exit status
-lgnutls
是LD
我使用的标志。但还是报错。