Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build Project - MinGW
Forum Updated to NodeBB v4.3 + New Features

Build Project - MinGW

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 2 Posters 2.7k 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.
  • F Offline
    F Offline
    fk12
    wrote on last edited by
    #1

    Hi, everyone. So, I have in a specific directory (C:\QtProjects\hello) the following files:

    • Hello.cpp,
    • hello.pro,
    • Makefile,
    • Makefile.Release,
    • Makefile.Debug,

    and the folders:

    • debug,
    • release

    Inside this directory, how do I build the project using MinGW (which I have already installed)? Thanks in advance!

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

      Hi and welcome to devnet,

      Do you want to do it from the command line or are you using QtCreator ?

      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
      • F Offline
        F Offline
        fk12
        wrote on last edited by
        #3

        Thanks! From the command-line.

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

          Then, call mingw32-make in the folder containing the Makefile

          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
          • F Offline
            F Offline
            fk12
            wrote on last edited by
            #5

            Thanks. I did that, and I got: 'g++' is not recognized as an internal or external command, operable problem or batch file. Before that, I even put the MinGW bin directory in the PATH environment variable.

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

              Did you generate the Makefiles or where they given to you ?

              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
              • F Offline
                F Offline
                fk12
                wrote on last edited by
                #7

                I think I did that...I am reinstalling MinGW, including the C++ compiler, not only the C one. I hope this fixes the issue. I'll write here to let you know. Thanks.

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fk12
                  wrote on last edited by
                  #8

                  New error: QApplication not found. The g++ error did not occur.

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    fk12
                    wrote on last edited by
                    #9

                    I added the whole directory C:\Qt to PATH, and I'm still getting the error of QApplication not being found.

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

                      Beware that if you are installing several mingw versions on your computer, you might get into trouble.

                      The standard way is to install the mingw environment that comes with Qt.

                      Also, re-run qmake on your project

                      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
                      • F Offline
                        F Offline
                        fk12
                        wrote on last edited by
                        #11

                        Thanks, I guess if that doesn't work I will forget about using the command-line and do everything through the IDE. Anyway, thanks again for your support.

                        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