问题1:可能因为是用homebrew安装的openssl,编译时找不到头文件,大概长这样:
'openssl/ssl.h' file not found
^
1 error generated.
解决方案:xcode-select --install 参考:openssl/ssl.h not found but installed with homebrew
问题2:遇到了ld: symbol(s) not found for architecture x86_64。
用g++也没用,在这卡了很久,搜到Resolving symbol(s) not found for architecture x86_64,想了想应该是链接库的问题,搜到关于openssl库的链接问题,命令行编译时加上参数 -lssl -lcrypto就可以了。
-FIN-
转载请注明原文地址: https://ju.6miu.com/read-670533.html