Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT5 from git, how to enable ssl support?
QtWS25 Last Chance

QT5 from git, how to enable ssl support?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 7.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    unmanner
    wrote on last edited by
    #1

    I could not recompile QT5 with -openssl-linked flag.

    I tried the following:
    @configure -static -platform win32-msvc2010 -openssl-linked -I "C:\Program Files (x86)\GnuWin32\include" -L "C:\Program Files(x86)\GnuWin32\lib" -no-vcproj -opengl desktop -nomake examples -nomake demos@

    And the compilation fails with output like the:
    @D:\QT5\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_
    SVG_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I"D:\QT5\q
    t5\qtbase\include" -I"D:\QT5\qt5\qtbase\include\QtSvg" -I"D:\QT5\qt5\qtbase\incl
    ude\QtWidgets" -I"D:\QT5\qt5\qtbase\include\QtNetwork" -I"D:\QT5\qt5\qtbase\incl
    ude\QtGui" -I"D:\QT5\qt5\qtbase\include\QtCore" -I".moc\debug_static" -I"D:\QT5
    qt5\qtbase\mkspecs\win32-msvc2010" -D_MSC_VER=1600 -DWIN32 weatherinfo.cpp -o .m
    oc\debug_static\weatherinfo.moc
    cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -DUNIC
    ODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -D
    QT_GUI_LIB -DQT_CORE_LIB -I"D:\QT5\qt5\qtbase\include" -I"D:\QT5\qt5\qtbase\incl
    ude\QtSvg" -I"D:\QT5\qt5\qtbase\include\QtWidgets" -I"D:\QT5\qt5\qtbase\include
    QtNetwork" -I"D:\QT5\qt5\qtbase\include\QtGui" -I"D:\QT5\qt5\qtbase\include\QtCo
    re" -I".moc\debug_static" -I"D:\QT5\qt5\qtbase\mkspecs\win32-msvc2010" -Fo.obj\d
    ebug_static\ C:\Users\unmanner\AppData\Local\Temp\nm716.tmp
    weatherinfo.cpp
    weatherinfo_plugin_import.cpp
    Generating Code...
    echo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID / 24 / RT_MANIFEST / "de
    bug\weatherinfo.exe.embed.manifest">debug\weatherinfo.exe_manifest.rc
    if not exist debug\weatherinfo.exe if exist debug\weatherinfo.exe.embed.
    manifest del debug\weatherinfo.exe.embed.manifest
    if exist debug\weatherinfo.exe.embed.manifest copy /Y debug\weatherinfo.
    exe.embed.manifest debug\weatherinfo.exe_manifest.bak
    Скопировано файлов: 1.
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFEST
    DEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.
    0' publicKeyToken='6595b64144ccf1df' language='
    ' processorArchitecture='*'" /MA
    NIFEST /MANIFESTFILE:debug\weatherinfo.exe.embed.manifest /OUT:debug\weatherinfo
    .exe C:\Users\unmanner\AppData\Local\Temp\nm10C7.tmp
    Creating library debug\weatherinfo.lib and object debug\weatherinfo.exp
    Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2001: unresolved e
    xternal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)"
    (??1QSslConfigurationQAEXZ)
    Qt5Networkd.lib(moc_qnetworkreplyhttpimpl_p.obj) : error LNK2001: unresolved ext
    ernal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (?
    ?1QSslConfigurationQAEXZ)
    Qt5Networkd.lib(qhttpthreaddelegate.obj) : error LNK2001: unresolved external sy
    mbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslCo
    nfigurationQAEXZ)
    Qt5Networkd.lib(moc_qhttpthreaddelegate_p.obj) : error LNK2001: unresolved exter
    nal symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1
    QSslConfigurationQAEXZ)
    Qt5Networkd.lib(qhttpnetworkconnection.obj) : error LNK2001: unresolved external
    symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSs
    lConfigurationQAEXZ)
    Qt5Networkd.lib(qnetworkreply.obj) : error LNK2019: unresolved external symbol "
    public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslConfigur
    ationQAEXZ) referenced in function "public: class QSslConfiguration __thiscal
    l QNetworkReply::sslConfiguration(void)const " (?sslConfigurationQNetworkReply
    QBE?AVQSslConfigurationXZ)
    Qt5Networkd.lib(qnetworkrequest.obj) : error LNK2001: unresolved external symbol
    "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSslConfig
    urationQAEXZ)
    Qt5Networkd.lib(qnetworkaccessmanager.obj) : error LNK2001: unresolved external
    symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSsl
    ConfigurationQAEXZ)
    Qt5Networkd.lib(qnetworkreplyhttpimpl.obj) : error LNK2001: unresolved external
    symbol "public: __thiscall QSslConfiguration::~QSslConfiguration(void)" (??1QSsl
    ConfigurationQAEXZ)

    ..........

    Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2019: unresolved e
    xternal symbol "public: void __thiscall QSslSocket::connectToHostEncrypted(class
    QString const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>,enum
    QAbstractSocket::NetworkLayerProtocol)" (?connectToHostEncryptedQSslSocketQAE
    XABVQStringGV?$QFlagsW4OpenModeFlagQIODeviceW4NetworkLayerProtocolQAbst
    ractSocketZ) referenced in function "public: bool __thiscall QHttpNetworkConn
    ectionChannel::ensureConnection(void)" (?ensureConnectionQHttpNetworkConnection
    ChannelQAE_NXZ)
    Qt5Networkd.lib(qhttpnetworkconnectionchannel.obj) : error LNK2019: unresolved e
    xternal symbol "public: __int64 __thiscall QSslSocket::encryptedBytesAvailable(v
    oid)const " (?encryptedBytesAvailableQSslSocketQBE_JXZ) referenced in functio
    n "protected: void __thiscall QHttpNetworkConnectionChannel::_q_error(enum QAbst
    ractSocket::SocketError)" (?_q_errorQHttpNetworkConnectionChannelIAEXW4Socket
    ErrorQAbstractSocketZ)
    debug\weatherinfo.exe : fatal error LNK1120: 22 unresolved externals
    NMAKE : fatal error U1077: '"f:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\link.EXE"' : return code '0x460'
    Stop.
    NMAKE : fatal error U1077: '"f:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Have a look at the "ssl":http://qt-project.org/doc/qt-5.0/qtnetwork/ssl.html documentation, this should help you build Qt with openssl linked.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        unmanner
        wrote on last edited by
        #3

        Hi SGais!

        Unfortunately it does not helps. I have the same result again.

        You think something wrong with Opensll libraries? As I can see linkage errors referenced to QT internal SSL functions?

        Now I tried:
        @D:\QT5\qt5>configure -openssl-linked OPENSSL_LIBS="-L/C:\Program Files (x86)\GnuWin32\lib -lssl -lcrypto" -no-vcproj -static -opengl desktop@

        Directory "C:\Program Files (x86)\GnuWin32\lib" contained:
        @24.03.2013 22:29 <DIR> .
        24.03.2013 22:29 <DIR> ..
        04.09.2008 00:12 2 053 578 libcrypto.a
        04.09.2008 00:34 1 900 576 libeay32.dll.a
        22.08.2008 23:52 345 886 libssl.a
        04.09.2008 00:34 140 536 libssl32.dll.a
        24.03.2013 22:29 <DIR> pkgconfig@

        1 Reply Last reply
        0
        • U Offline
          U Offline
          unmanner
          wrote on last edited by
          #4

          Hi all,

          problem is exist, anyone can help my?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Sorry I forgot to reply, did you try with "this":http://slproweb.com/products/Win32OpenSSL.html version of OpenSSL ? I've been using it successfully to build Qt (though not linked) Also they provide a more up to date version of OpenSSL (1.0.1k)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              try (without the slash after -L):
              @
              OPENSSL_LIBS="-LC:\Program Files (x86)\GnuWin32\lib -lssl -lcrypto"
              @

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved