Results 1 to 3 of 3

Thread: QSslSocket Problems

  1. #1
    Join Date
    Jun 2008
    Location
    UK
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QSslSocket Problems

    Hi,

    Im having some problems getting QSslSocket working, im using QDevelop with Qt 4.3.4.

    I first got the error that QSslSocket header was not found, i fixed this by adding to the INCLUDEPATH variable: /usr/include/QtNetwork/ which is where qsslsocket.h is on my system. I could now compile with including <QSslSocket>.

    As soon as i tried to use a class eg: socket = new QSslSocket(this);

    I get the error:
    nsocket.cpp.text+0x25): undefined reference to `QSslSocket::QSslSocket(QObject*)'
    collect2: ld returned 1 exit status


    So it sounds like there is a missing library somehow?

    Any ideas on what im doing wrong here? Im using the default package provided by Arch Linux for Qt, and i have OpenSSL installed as well.

    Thanks for any pointers,
    Jack

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QSslSocket Problems

    First of all, Qt must've been compiled with SSL support turned on. You should've seen configure output for details.

    If your Qt was compiled with SSL support turned on, then it's only a matter of adding the following line in the .pro file of your app:
    Qt Code:
    1. QT += network
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. #3
    Join Date
    Dec 2014
    Posts
    1
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Exclamation Re: QSslSocket Problems

    I have this same type of problem and yes I have already added to my project file QT =+ network I feel the problem is that I'm missing openssl library but I've tried to install it and add the path of where I installed the openssl file to within my .pro file but maybe I'm not doing it right but no matter what I've tried so far, my program breaks the moment my program tries to use a ssl command. I tried testing for ssl support by using QSslSocket::supportsSsl() but the code just crashes even at that. Any clues?

Similar Threads

  1. QSslSocket problem
    By The Storm in forum Qt Programming
    Replies: 5
    Last Post: 23rd March 2008, 12:58
  2. Ssl problems
    By Unplugged in forum Newbie
    Replies: 3
    Last Post: 4th October 2007, 07:02
  3. QSslSocket problems
    By TheOnlyDan in forum Qt Programming
    Replies: 6
    Last Post: 27th September 2007, 11:54
  4. Replies: 2
    Last Post: 8th March 2007, 22:22
  5. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

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.