我用mingw在win32下成功编译了OpenSSL 1.0.1。现在我想要编译静态的Qt 4.8.1具有以下配置:用openSSL错误编译静态Qt
configure -release -static -qt-zlib -nomake examples -nomake demos -no-qt3support -no-scripttools -no-opengl -no-webkit -no-phonon -no-style-motif -no-style-cde -no-style-cleanlooks -no-style-plastique -no-sql-sqlite -openssl-linked OPENSSL_LIBS="-lssl -lcrypto -lgdi32 -luser32" -I H:\Workplace\OpenSSL\include -L H:\Workplace\OpenSSL
我得到了这些错误:
H:\Workplace\OpenSSL/libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x17be): undefined ref erence to '_time32'
(多次)
H:\Workplace\OpenSSL/libcrypto.a(o_time.o):o_time.c:(.text+0x362): undefined ref erence to '_gmtime32'
H:\Workplace\OpenSSL/libcrypto.a(mem_dbg.o):mem_dbg.c:(.text+0x4c7): undefined r eference to '_localtime32'
已解决(参见bel ow)
是的,我需要它。我想让我的.exe不依赖于libeay和libssl。 – Eddie 2012-04-16 07:08:00
尽管我应该尝试一下,因为在此之前,我尝试使用安装的openssl编译qt,现在它已经用mingw编译了。 – Eddie 2012-04-16 07:22:32
将需要-openssl-linked openssl,并且如果没有它,应用程序将无法启动。但是,如果你使用-openssl flag -qt,尝试加载openssl synamicaly,如果它不能被加载 - 根本不使用它(在这种情况下,应用程序将运行,但如果你使用ssl套接字(例如) - 他们wouldn没有工作)。 – PSyton 2012-04-16 13:37:42