Combining two projects in one



  • Hello! What do we have : 1 working project , it's just a QWidget with number of buttons, and second one is another project,also using QWidget with some buttons. Both dialogs were edited in UIDesigner,and works separately.
    What i want : to evoke 1 dialog from another.
    How i combined projects: just added code using addExistingFile, then add .h,.cpp. and .ui files into one project.
    when i compile this project now i get errors like this :

    smtp.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) class QDebug __cdecl operator<<(class QDebug,enum QAbstractSocket::SocketError)" (_imp??6@YA?AVQDebug@@V0@W4SocketError@QAbstractSocket@@@Z) referenced in function "private: void __cdecl Smtp::errorReceived(enum QAbstractSocket::SocketError)" (?errorReceived@Smtp@@AEAAXW4SocketError@QAbstractSocket@@@Z)
    smtp.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QSslSocket::~QSslSocket(void)" (_imp??1QSslSocket@@UEAA@XZ) referenced in function "public: virtual void * __cdecl QSslSocket::`scalar deleting destructor'(unsigned int)" (??_GQSslSocket@@UEAAPEAXI@Z)
    smtp.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QSslSocket::connectToHostEncrypted(class QString const &,unsigned short,class QFlags<enum QIODevice::OpenModeFlag>,enum QAbstractSocket::NetworkLayerProtocol)" (_imp?connectToHostEncrypted@QSslSocket@@QEAAXAEBVQString@@GV?$QFlags@W4OpenModeFlag@QIODevice@@@@W4NetworkLayerProtocol@QAbstractSocket@@@Z) referenced in function "public: void __cdecl Smtp::sendMail(class QString const &,class QString const &,class QString const &,class QString const &,class QStringList)" (?sendMail@Smtp@@QEAAXAEBVQString@@000VQStringList@@@Z)

    What is the problem, any help is highly appreciated! Thanks in advance!


  • Moderators

    Do you have QT += network in your PRO file?



  • yes, now i just have 2 errors, the following code makes error :
    MsgSender w(this) ;

    browser.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl MsgSender::MsgSender(class QWidget *)" (??0MsgSender@@QEAA@PEAVQWidget@@@Z) referenced in function "public: void __cdecl Browser::showTable(class QString const &)" (?showTable@Browser@@QEAAXAEBVQString@@@Z)
    browser.obj:-1: error: LNK2019: unresolved external symbol "public: virtual __cdecl MsgSender::~MsgSender(void)" (??1MsgSender@@UEAA@XZ) referenced in function "public: void __cdecl Browser::showTable(class QString const &)" (?showTable@Browser@@QEAAXAEBVQString@@@Z)


  • Moderators

    What is MsgSender? Where is it defined? I think you forgot to add it to your project.



  • solved! i've deleted release folder and rebuilded project, because qt didn't generated my ui form.


Log in to reply
 

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