[Solved] Using Third Party Library



  • Hi guys, I'm using Fedora Linux and I've installed "ne7ssh":http://www.netsieben.com/products/ssh/index.phtml (third party library) and all it dependencies using the yum package manager, so far so good. I started playing with this library but I couldn't go further, I receive the following error message when I try to compile:

    undefined reference to `ne7ssh::ne7ssh()' mysshclient.cpp

    Here is my code:

    @
    #include "mysshclient.h"
    #include "ui_mysshclient.h"

    #include "ne7ssh.h"

    MySSHClient::MySSHClient(QWidget *parent) : QMainWindow(parent), ui(new Ui::MySSHClient)
    {

    ui->setupUi(this);
    
    ne7ssh *ssh = new ne7ssh();
    

    }
    @

    Here is my .pro file:

    @
    #-------------------------------------------------

    Project created by QtCreator 2012-04-11T21:08:08

    #-------------------------------------------------

    QT += core gui

    TARGET = MySSHClient
    TEMPLATE = app

    SOURCES += main.cpp
    mysshclient.cpp

    HEADERS += mysshclient.h

    FORMS += mysshclient.ui
    @

    ...any clue about this?

    Thanks in advance!



  • I've moved your topic to the appropriate forum.

    You need to link to the library too. You can do that from the .pro file. Reference the documentation for the LIBS variable in the QMake manual.



  • Guess you missed out the third part library linkage in .PRO file.

    You may have to add the third party library details as below in your .PRO file for linking.

    LIBS += -L{Libraray_Path} -l{Library_Name}

    ~veeraps



  • Done!

    Thanks both of you!


Log in to reply
 

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