QSslSocket gives dll not found exception
I've created a simple dll which starts up a new thread and handles different network request. Working with ordinary HTTP requests works fine but I've gotten some problems when trying to start using HTTPS instead.
I've installed openssl and configured qt to use it with:
-openssl -I C:\OpenSSL\include -L C:\OpenSSL\lib
I can compile the dll but when I try to access the dll from my application I get a IniterrorSystem.DllNotFoundException.
This error appears as soon as I try to use the QSslSocket class, for example I'm just trying to initiate a variable.
QSslSocket socket;
With this initiation the dll crashes with the above error.
//QSslSocket socket;
removing the init will let the dll continue but the https request doesn't work and I don't get any error message from the QNetworkAccessManager. I tried connecting to the sslError signal but that never happens as well.
I've put the dlls "libeay32.dll", "libssl32.dll" & "ssleay32.dll" in the same folder as my dll and have OpenSSL successfully installed.
Anyone have any Idea what I'm missing?
Re: QSslSocket gives dll not found exception
If OpenSSL is install make sure its bin directory is in the system path and you do not have to worry about copying DLLs about. Anyway, you are probably missing libcrypto.
Re: QSslSocket gives dll not found exception
When I searched the web for libcrypto it seems to be a file required for MinGW compiler, I'm compiling my dll with msvc2010 compiler and not MinGW. Sorry for not stating that directly. anyway I tried to include the libcrypto dll and it didn't make any difference. Another thing is that I've actually been able to create an application (not dll) that do the same thing as my dll and that application works fine with HTTPS. The application is then instead compiled with the MinGW compiler. I have all VC++ Redistributable packages installed as well. Can't get a grip on this...
Re: QSslSocket gives dll not found exception
Libcrypto is part of OpenSSL sometimes linked statically, sometimes dynamically. Nothing to do with your choice of compiler