使用环境是 macOS13 Qt版本是9.0
错误原因分析:未导入 ssl 和 crypto 相关库
解决方法:在 .pro 文件中加入一下代码
LIBS += -lssl
LIBS += -lcrypto
LIBS += -L"/opt/homebrew/Cellar/openssl@1.1/1.1.1s/lib"
INCLUDEPATH += /opt/homebrew/Cellar/openssl@1.1/1.1.1s/include
其中openssl的路径依据安装路径不同存在不一致的情况,我自己的openssl是通过 brew install openssl 如果是M系列可能需要使用 arch -arm64 brew install openssl