Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Combining two projects in one
Forum Updated to NodeBB v4.3 + New Features

Combining two projects in one

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bazelboday
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bazelboday
        wrote on last edited by
        #3

        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)

        1 Reply Last reply
        0
        • jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Bazelboday
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved