QFtp problem



  • hi every body.

    @
    #include <QtNetwork/QFtp>

    int main(int argc, char *argv[])
    {
    QFtp f;

    return 0;
    

    }
    @

    error link :

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QFtp::~QFtp(void)" (_imp??1QFtp@@UAE@XZ) referenced in function _main

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QFtp::QFtp(class QObject *)" (_imp??0QFtp@@QAE@PAVQObject@@@Z) referenced in function _main

    debug\emptyProject.exe:-1: error: LNK1120: 2 unresolved externals



  • Hi,

    did you add
    @
    QT += network
    @

    in your .pro file? QtNetwork is separate module(dll) in Qt libraries.



  • Also be aware that QFtp is deprecated. It is better to use QnetworkAccessManager in new code if you can. Although at present it is not yet a complete replacement for QFtp.



  • tnx a lot for your help.


Log in to reply
 

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