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. link problems
Qt 6.11 is out! See what's new in the release blog

link problems

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 3.2k Views 2 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.
  • P Offline
    P Offline
    pdnorman
    wrote on last edited by
    #1

    I retired a little over a year ago and have not used Qt since leaving the work place. I installed QT and mingw 5.3 and tried to compile a simple program. I am pasting the link commands and the first few error messages where the link step failed:

    g++ -Wl,-subsystem,windows -mthreads -o debug\Singles_party.exe debug/begin_party.o debug/party_room.o debug/moc_party_room.o -lmingw32 -LC:\Qt\5.7\mingw53_32\lib C:\Qt\5.7\mingw53_32\lib\libqtmaind.a -LC:\utils\postgresql\pgsql\lib -LC:\utils\my_sql\my_sql\lib -lshell32 C:\Qt\5.7\mingw53_32\lib\libQt5Guid.a C:\Qt\5.7\mingw53_32\lib\libQt5Cored.a
    debug/begin_party.o: In function Z5qMainiPPc': C:\Users\bigdad\Paul\QT\Programs\Singles_party/begin_party.cpp:6: undefined reference to _imp___ZN12QApplicationC1ERiPPci'
    C:\Users\bigdad\Paul\QT\Programs\Singles_party/begin_party.cpp:8: undefined reference to _imp___ZN7QWidget4showEv' C:\Users\bigdad\Paul\QT\Programs\Singles_party/begin_party.cpp:9: undefined reference to _imp___ZN12QApplication4execEv'

    Can someone tell me what I need to do here?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #7

      Hi and welcome to devnet,

      Any chance of missing QT += widgets in your .pro file ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        The mingw you installed.
        Was that from the Qt online installer?

        1 Reply Last reply
        1
        • P Offline
          P Offline
          pdnorman
          wrote on last edited by
          #3

          No, from sourceforge

          mrjjM 1 Reply Last reply
          1
          • P pdnorman

            No, from sourceforge

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @pdnorman
            Ok that could be the issue.
            If possible could u remove Qt and install with
            http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-windows-x86-mingw530-5.7.0.exe
            Its 99% of the time a happy just works out of the box.

            1 Reply Last reply
            2
            • P Offline
              P Offline
              pdnorman
              wrote on last edited by
              #5

              same thing happens

              mrjjM 1 Reply Last reply
              0
              • P pdnorman

                same thing happens

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @pdnorman
                Ok ?!
                Also with a default GUI project via File->New Qt widget application ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  Hi and welcome to devnet,

                  Any chance of missing QT += widgets in your .pro file ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • P Offline
                    P Offline
                    pdnorman
                    wrote on last edited by
                    #8

                    I DID need the QT += widgets in the .pro file. Thanks

                    1 Reply Last reply
                    1

                    • Login

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