ssl/qsslsocket_openssl_symbols_p.h:257:16: error: variable or field ‘q_sk_free’ declared void ssl/qsslsocket_openssl_symbols_p.h:257:16: error: ‘STACK’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:257:23: error: ‘a’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:258:14: error: ‘STACK’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:258:21: error: ‘a’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:259:19: error: ‘STACK’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:259:26: error: ‘a’ was not declared in this scope ssl/qsslsocket_openssl_symbols_p.h:259:29: error: expected primary-expression before ‘int’ ssl/qsslsocket_openssl_symbols_p.h:259:34: error: initializer expression list treated as compound expression ssl/qsslcertificate.cpp: In member function ‘QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubjectNames() const’: ssl/qsslcertificate.cpp:365:5: error: ‘STACK’ was not declared in this scope ssl/qsslcertificate.cpp:365:12: error: ‘altNames’ was not declared in this scope ssl/qsslcertificate.cpp:365:31: error: expected primary-expression before ‘)’ token ssl/qsslcertificate.cpp:365:32: error: expected ‘;’ before ‘q_X509_get_ext_d2i’ ssl/qsslcertificate.cpp:386:27: error: ‘q_sk_free’ was not declared in this scope ssl/qsslcertificate.cpp: In function ‘bool matchLineFeed(const QByteArray&, int*)’: ssl/qsslcertificate.cpp:689:18: warning: value computed is not used
类似上面的错误,原因在于openssl的版本过高
解决方法:
1. 降低openssl版本
2. 选用比较新的Qt版本
3. 在configure中加上选项 -no-openssl
4. 修改源码,使得支持新版的openssl