Linking with QSsl in iOS app



  • I'm trying to build one ios example app for armv7 and arm64 and I'm getting the following linking error:

    QWebSocket::sslErrors(QList<QSslError> const&)", referenced from:
    Example::example(QString const&) in exampleProject.o

    This is only an example of linking error, I get more, all related with QSsl. As far I know, QSsl is on libQt5Network so when I inspect this lib for symbols I get the following result:

    warning: /Applications/Xcode64.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
    warning: /Applications/Xcode64.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
    0000074c T __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    00000748 T __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    00000388 T __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    00000384 T __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    warning: /Applications/Xcode64.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
    warning: /Applications/Xcode64.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    0000000000000a68 T __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    0000000000000a64 T __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    0000000000000504 T __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    0000000000000500 T __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN21QNetworkAccessBackend19setSslConfigurationERK17QSslConfiguration
    U __ZNK21QNetworkAccessBackend21fetchSslConfigurationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration
    U __ZN13QNetworkReply33setSslConfigurationImplementationERK17QSslConfiguration
    U __ZNK13QNetworkReply30sslConfigurationImplementationER17QSslConfiguration

    So I get that QSsl* symbols are not implemented. I have downloaded Qt from web so I think this versions is ok. Any idea about what is happening? Any issue building for iOS?

    PD: This is my first post in this forum, so sorry if I forget any tag to format code or something like that.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's because by default Apple doesn't ship OpenSSL with iOS and if you want to use it you have to build it yourself and ship it with your application. But there's currently a new backend using OS X/iOS Cryptographic Architecture so depending on your version of Qt, you can either rebuild it to use that backend or it's already built that way (IIRC it should be the default starting with 5.6)



  • @SGaist Thanks for your answer. If I want to use a particular ssl implementation, how I can indicate that in my example.pro? I mean , I have one ssl implementation and I want to link with that instead of openssl.


  • Lifetime Qt Champion

    What do you mean by "I have one ssl implementation" ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.