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. Unresolved external symbol Qt 5
Forum Updated to NodeBB v4.3 + New Features

Unresolved external symbol Qt 5

Scheduled Pinned Locked Moved General and Desktop
9 Posts 5 Posters 14.5k Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    qt_newbie89
    wrote on last edited by
    #1

    Hi everybody, I am a starter in Qt programming and currently following the C++ Qt programming videos on Youtube. The errors occur when I follow this video:
    http://www.youtube.com/watch?v=wUH_gu2HdQE&list=SP2D1942A4688E9D63&index=5
    I did exactly like in the video, but starts to get error at 6:29 when I declared "MyDialog mDialog;"
    The compiler throws out these error:
    @mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: virtual __thiscall MyDialog::~MyDialog(void)" (??1MyDialog@@UAE@XZ) referenced in function "private: void __thiscall MainWindow::on_actionNew_triggered(void)" (?on_actionNew_triggered@MainWindow@@AAEXXZ)@

    @mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: virtual __thiscall MyDialog::~MyDialog(void)" (??1MyDialog@@UAE@XZ) referenced in function "private: void __thiscall MainWindow::on_actionNew_triggered(void)" (?on_actionNew_triggered@MainWindow@@AAEXXZ)@

    I have done research on the Internet and they said mostly about including headers file, but I have done all that and follow all the steps in the videos but still getting the errors.
    The only difference in my program is when I added the new dialog, I couldn't rightclick on Forms but on MyWindows project folder in Projects windows.

    I would be greatly appreciated if you can give me any advices on this issue.
    I used the lastest Qt SDK and IDE.
    PS: I have tried to delete and recreate the whole new project for many times and it is still not working.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      For me, that happened when I tried to link against MSVC-compiled Qt libraries using MinGW toolchain by mistake.

      I would check the toolkit twice to avoid such errors.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qt_newbie89
        wrote on last edited by
        #3

        Thanks very much for your reply!
        But would you please show me how can I check that error?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qt_newbie89
          wrote on last edited by
          #4

          I have "accidentally" solved the problem.
          I rightclicked on the project folder in the Project windows and choose qmake. After that, choose Run and all the errors disappeared.
          I don't know why that works by the way.

          1 Reply Last reply
          1
          • S Offline
            S Offline
            soroush
            wrote on last edited by
            #5

            In Qt creator go to Tools => Options => Build and run then see Qt versions and Tool Chains tabs. There should be a list of your installed Qt libraries and available toolchains.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              f0ou4d
              wrote on last edited by
              #6

              @qt_newbie89
              I'd the same error just like you :( I coudn't build my application, it was very difficalt to find a solution of this probleme.
              So I used your solution and it works very well with me, and now i can build my application ;)
              Thank you very much.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Bridenstine
                wrote on last edited by
                #7

                (Using Qt creator 3.0.0 Based on Qt 5.2.0) I to could not right click on Forms and had to add the header file through the File tab, then New File or Project. However I don't have the .cpp or .ui file. Did you guys manually add these as well? As for soroush's response on Tool Chains and Libraries I don't have anything to add in that tab so is there anything you can recommend I download in order to add to that tab to fix this problem?

                -Thanks in advance for any help I may receive

                Bridenstine

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JazzKatua
                  wrote on last edited by
                  #8

                  I had the same problem over & over in Qt-Win. As qt_newbie89 mentioned; if you right-click on your project (visible in the topleft-sidebar containing all your header, sources, ui & .pro), you can choose 'Run qmake'. Build your project and the project builded without errors! Thnx qt-newbie89!

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Bridenstine
                    wrote on last edited by
                    #9

                    It seems my problem laid in a more simple area at time 4:08 in the video https://www.youtube.com/watch?v=wUH_gu2HdQE I was unable to right click on Forms (Using Qt creator 3.0.0 Based on Qt 5.2.0) and I found the simple solution of right clicking on the folder containing the .pro (project) instead.

                    Bridenstine

                    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