Results 1 to 4 of 4

Thread: QSslSocket gives dll not found exception

  1. #1
    Join Date
    Jun 2012
    Posts
    14

    Default 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?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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.

  3. #3
    Join Date
    Jun 2012
    Posts
    14

    Default 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...

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. QSslSocket to much data?
    By Qiieha in forum Qt Programming
    Replies: 21
    Last Post: 1st February 2012, 22:56
  2. QSslSocket example
    By Ratheendrans in forum Qt Programming
    Replies: 3
    Last Post: 6th July 2011, 20:51
  3. NEED HELP!!! about qsslsocket
    By asnoka in forum Installation and Deployment
    Replies: 2
    Last Post: 12th May 2008, 15:12
  4. QSslSocket problems
    By TheOnlyDan in forum Qt Programming
    Replies: 6
    Last Post: 27th September 2007, 11:54
  5. QSslSocket : Having troubles
    By Nyphel in forum Newbie
    Replies: 3
    Last Post: 27th June 2007, 14:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.