[Qt-interest] Getting Openssl working in windows
Paul Colby
qt at colby.id.au
Mon Nov 30 11:46:33 CET 2009
AFAIK, -openssl causes the Qt libs to try to delay-load the OpenSSL
libs at runtime... there are many reasons that could fail (not Qt's
fault, but mostly Windows DLL hell, etc).
Then there's -openssl-linked which statically links the OpenSSL libs
into the Qt libs... however, depending on which OpenSSL libs you
statically link (ie the default libs?), the linked code can simply
require (as opposed to delay-load) the OpenSSL DLLs at runtime - which
is worse in a way, in that it can fail just as easily, but failures
mean that the app won't even load if there's a problem using the
OpenSSL libs.
So, personally, I find it most reliable to statically link the
*static* OpenSSL libraries... something like this:
configure -openssl-linked OPENSSL_LIBS="-lssl -lcrypto -lgdi32
-lWs2_32" -I C:\OpenSSL\include -L C:\OpenSSL\lib
Note that the gdi and ws2 libs may or may not be required depending on
your version of OpenSSL, compiler, etc.
... sorry about the lack of detailed explanation (going to bed now)...
but hopefully that will help you out a bit ;)
paul.
--
http://colby.id.au
On Mon, Nov 30, 2009 at 8:23 PM, Simarillion <simarillion at gmx.de> wrote:
> Hi,
>
> I'm trying to get openssl working in Qt windows. What I did:
>
> 1. I installed the binaries of Qt 4.5.3 with the installer
>
> 2. I installed openssl (Win32 OpenSSL v0.9.8l) from
> http://www.slproweb.com/products/Win32OpenSSL.html
>
> 3. I set environment variables:
> LIB C:\OpenSSL\lib
> INCLUDE C:\OpenSSL\include
>
> 4. I went to directory C:\Qt\2009.04\qt
>
> 5. run: configure -openssl
>
> 6. run: mingw32_make
>
> 7. everything compiled fine without errors
>
> But when I call QSslSocket::supportsSsl(); I still get FALSE.
>
> Did I forget something? Do I have to change anything in
> .../network/ssl/ssl.pri? Any idea?
>
> Greets
> Michael
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list