Solved Getting "qt.network.ssl: QSslSocket: cannot call unresolved function..." when trying to send network request
-
Where can I find the modules panel?
I'm using Qt version 5.2.2, and my OpenSSL version is OpenSSL v1.0.2n.I tried running the program from the .exe directly, which has both openssl dlls in its directory, however it seems like the same error is still occurring there. I checked this by just setting a labels text to reply->readAll(), which resulted in an empty label with nothing in it.
-
@TheMushroom
oh... the Modules panel is hidden by default.
You can make it visible from the menu (Window -> Views -> Modules)Did you override the run environment (in the project settings) - specifically the PATH variable - maybe?
-
Hi,
To add to @raven-worx, are you sure that your OpenSSL libraries are built for MinGW and in 32 bit ?
-
@SGaist
OpenSSL binaries should only expose a C-interface, so there shouldn't be a problem regarding this.
I know that the 1.1.x libraries do append-x64
in the library filename, but i don't know if that was also the case prior v1.1.x -
@raven-worx
For some reason my Window->Views button is greyed out and can't be clicked.Is this the "project settings" tab? :
Screenshot
There doesn't seem to be any upper case PATH value, only a "Path" one.@SGaist
I'm not sure what they were compiled for actually. I downloaded them off this site. -
@TheMushroom said in Getting "qt.network.ssl: QSslSocket: cannot call unresolved function..." when trying to send network request:
For some reason my Window->Views button is greyed out and can't be clicked.
you need to be in the Debug view (big Tab selected on the left side), then the menu item is enabled.
Is this the "project settings" tab? :
yes. Your environment isn't overridden.
I downloaded them off this site.
I just used OpenSSL today successfully with Qt 5.10.1 and mingw. I've downloaded it from here.
-
@raven-worx indeed there shouldn't. However it's usually better to have everything from one compiler if possible to avoid surprises.
I was also thinking about 32 VS 64 bit builds.
-
@raven-worx
How would I link the OpenSSL to Qt?I tried using the "Add Library..." feature in Qt, which generated the following lines in my .pro file:
win32:CONFIG(release, debug|release): LIBS += -LD:/OpenSSL-Win32/lib/MinGW/ -lssl-1_1 else:win32:CONFIG(debug, debug|release): LIBS += -LD:/OpenSSL-Win32/lib/MinGW/ -lssl-1_1d else:unix: LIBS += -LD:/OpenSSL-Win32/lib/MinGW/ -lssl-1_1 INCLUDEPATH += D:/OpenSSL-Win32/include DEPENDPATH += D:/OpenSSL-Win32/include win32:CONFIG(release, debug|release): LIBS += -LD:/OpenSSL-Win32/lib/ -llibcrypto else:win32:CONFIG(debug, debug|release): LIBS += -LD:/OpenSSL-Win32/lib/ -llibcryptod else:unix: LIBS += -LD:/OpenSSL-Win32/lib/ -llibcrypto INCLUDEPATH += D:/OpenSSL-Win32/include DEPENDPATH += D:/OpenSSL-Win32/include
I also added the libssl-1_1.dll and libcrypto-1_1.dll into the same places as I did with the libeay32.dll and ssleay32.dll files.
Still the same errors :(
-
You don't link. By default Qt loads the OpenSSL .dll.
However from the looks of it, you downloaded the 1.1 series which is not compatible with the 1.0.
-
@TheMushroom said in Getting "qt.network.ssl: QSslSocket: cannot call unresolved function..." when trying to send network request:
How would I link the OpenSSL to Qt?
for that you would have to reconfigure and recompile Qt. As @SGaist said by default the OpenSSL libs are loaded dynamically.
What does the modules view show now?
-
@SGaist
Downloaded the 1.0 version and copied the libeay32.dll, ssleay32.dll and libssl32.dll to the same places as before and it's all working now. No errors and everything seems to be working.@SGaist @raven-worx
Thanks a lot for the help! :) -
@TheMushroom great you solved your problem. Please don't forget to mark your post as such. Thanks.
-
Had the same problem. Thought I was on MinGW, but somehow was on MSCV2015. Switching the Kit (back) to Desktop Qt 5.10.1 MinGW 32bit did the trick for me.
-
@QtFlorian
Do you have@TheMushroom said in Getting "qt.network.ssl: QSslSocket: cannot call unresolved function..." when trying to send network request:
libeay32.dll, ssleay32.dll and libssl32.dll
dlls in your application?
-
@SGaist Hello, I have the same issue but and i don't know which version should i download and copy in my debug folder ! can you help me please
-
@Jasmin-Quinn Qt Online Installer and Qt Maintenance Tool provide the possibility to install OpenSSL, use that.
-
@TheMushroom can you please tell me where did you place them exactly and from where u downloaded it
-
@jsulm I looked for it but didn't find the possibility to install OpenSsl . However, even if I did I still don't know which version is compatible with my Qt 5.9.9
-
@Jasmin-Quinn According to https://doc.qt.io/archives/qt-5.9/ssl.html it is 1.0.x
-
You can use QSslSocket:: sslLibraryBuildVersionString to ensure which version was used.