注册 登录
编程论坛 QT论坛

qt4 在ubuntu20.04下源码编译遇到ssl错误

wb197 发布于 2022-06-29 11:26, 1438 次点击
g++ -c -include .pch/release-shared/QtNetwork -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtNetwork -I.rcc/release-shared -Ikernel -I.moc/release-shared -o .obj/release-shared/qsslkey.o ssl/qsslkey.cpp
ssl/qsslkey.cpp: In member function ‘int QSslKey::length() const’:
ssl/qsslkey.cpp:325:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
            ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
                                  ^~
In file included from /usr/local/include/openssl/crypto.h:36:0,
                 from /usr/local/include/openssl/bio.h:30,
                 from /usr/local/include/openssl/asn1.h:30,
                 from ssl/qsslsocket_openssl_p.h:66,
                 from ssl/qsslsocket_openssl_symbols_p.h:57,
                 from ssl/qsslkey.cpp:62:
/usr/local/include/openssl/types.h:143:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
ssl/qsslkey.cpp:325:61: error: invalid use of incomplete type ‘DSA {aka struct dsa_st}’
            ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
                                                             ^~
In file included from /usr/local/include/openssl/crypto.h:36:0,
                 from /usr/local/include/openssl/bio.h:30,
                 from /usr/local/include/openssl/asn1.h:30,
                 from ssl/qsslsocket_openssl_p.h:66,
                 from ssl/qsslsocket_openssl_symbols_p.h:57,
                 from ssl/qsslkey.cpp:62:
/usr/local/include/openssl/types.h:138:16: note: forward declaration of ‘DSA {aka struct dsa_st}’
 typedef struct dsa_st DSA;
                ^~~~~~
1 回复
#2
xhrain2022-09-26 22:14
对应头文件是否包含了。
1