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. [Solved] Issues with qmake and mingw
Forum Updated to NodeBB v4.3 + New Features

[Solved] Issues with qmake and mingw

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.0k 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.
  • D Offline
    D Offline
    David.Waller
    wrote on last edited by
    #1

    I have recently installed QT5.2.1 including the mingw package. I have created the standard hello.cpp and used qmake to generate the build files (qmake -project and qmake hello.pro).
    When I come to build (with mingw32-make) it fails by not being able to find the header file QApplication. On looking at the makefile and the various directories searched, it is not looking at the QWidget directory and hence cannot find QApplication. When I fix this (by editing the makefile) it cannot find the correct lib. Again I can fix this by including the Qt5Widget lib in the makefile.
    I am assuming I am doing something wrong, what can I do to force the compiler to look at QWidget. Is there any way I can customise a setting of Qmake so that it will add the required lines to the makefile.

    Thanks for your help

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Your pro file likely does not contain
      @
      QT += widgets
      @

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

        Hi and welcome to devnet,

        You are missing

        @QT += widgets@

        in your pro file.

        On Windows, you should use Qt Creator. Windows command line development is not as friendly as on either Linux or OS X

        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
        0
        • D Offline
          D Offline
          David.Waller
          wrote on last edited by
          #4

          Thanks for your help.
          I initially was using the command line to try and understand what was happening better. I now understand this better and have also successfully got the same programme working under Qt Creator.

          Again thanks for your help.

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

            You're welcome !

            Since you are now a happy coder, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

            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
            0

            • Login

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