0

I am trying to learn how to network using Qt, and I recently got stuck with one of their examples, "The twitter timeline example", it keeps on giving me this error,"", after surfing the net, I found out that it is probably because I do not have openssl installed. Can someone please tell me what I am doing

After following this example and several others, How to Include OpenSSL in a Qt project , the problem remains unchanged.

this is my .pro file

QT = core widgets network networkauth
requires(qtConfig(tableview))
CONFIG -= app_bundle
LIBS += -LC:/OpenSSL-Win64/lib -lubsec
HEADERS += \
    twitter.h \
    twittertimelinemodel.h
INCLUDEPATH += C:/OpenSSL-Win64/include
SOURCES += \
    main.cpp \
    twitter.cpp \
    twittertimelinemodel.cpp

FORMS += \
    twitterdialog.ui

# install
target.path = $$[QT_INSTALL_EXAMPLES]/oauth/twittertimeline
INSTALLS += target

qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed qt.networkauth.replyhandler: TLS initialization failed The error it keeps on returning.

Dimitry Ernot
  • 6,256
  • 2
  • 25
  • 37
  • 1
    can you and download the binary files and extract the files where your executable is located. https://indy.fulgan.com/SSL/. – agent_bean Jun 02 '19 at 08:32
  • did that now, I am still getting the same error – abdulmueez emiola Jun 02 '19 at 09:06
  • 1
    can you double check how you are compiling your executable. make sure your you are not mixing libraries if you compile for 64 make sure the other dlls are also compiled as 64 bit. i compiled on my machine with visual studio 2015 x64 with just the default settings and it works. – agent_bean Jun 02 '19 at 11:07
  • Thanks a lot, The problem was due to the fact that I had tried a lot of things without removing them, copied the code to a different project and tried it out, it works. Thanks a lot – abdulmueez emiola Jun 03 '19 at 16:57
  • Hello, I think I am still in need of a little help, I am trying to write an app that uses the google search api, and I have tried using the same approach but the error isn't leaving. In addition to the "QJsonParseError::IllegalValue" – abdulmueez emiola Jun 14 '19 at 22:05
  • QSslSocket::supportsSsl() and I used this function to check whether system supports ssl, got a false – abdulmueez emiola Jun 14 '19 at 22:28

0 Answers0