April 29, 2012

ahura_24 ahura_24
Ant Farmer
97 posts

QFtp problem

 

hi every body.

  1. #include <QtNetwork/QFtp>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5.     QFtp f;
  6.  
  7.     return 0;
  8. }

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

3 replies

April 29, 2012

task_struct task_struct
Hobby Entomologist
344 posts

Hi,

did you add

  1. QT += network

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

 Signature 

“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds

April 29, 2012

ZapB ZapB
Robot Herder
1356 posts

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.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 29, 2012

ahura_24 ahura_24
Ant Farmer
97 posts

tnx a lot for your help.

 
  ‹‹ Double the column in QSqlTableModel      Segmentation fault in QGraphicsView::setScene() ››

You must log in to post a reply. Not a member yet? Register here!