我正在为vapor项目开发 TLS 库,并且支持 Apple 的 (Transport-)Security 和 OpenSSL,以便在 HTTP/2 客户端和服务器中使用。
在这行代码中,我试图调用SSLSetALPNProtocols
. 无论我采用何种方法,我ld
都会在该行代码中遇到链接器错误。
Undefined symbols for architecture x86_64:
"_SSLSetALPNProtocols", referenced from:
__T08AppleSSL9SSLOptionV4alpnACSaySSG9protocols_tFZySo10SSLContextCKcfU_ in Options.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
由于该页面为空,因此没有可用的文档来突出显示可能的明显错误。
那么,如何让这段代码在支持 ALPN 的情况下进行编译?