Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. "build" versus "qmake" ? ( question )
Forum Updated to NodeBB v4.3 + New Features

"build" versus "qmake" ? ( question )

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
12 Posts 5 Posters 1.6k Views 5 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    What are Qt definitions of these ?

    I believe there is an option to ""always use qmake " when using "build" or something to that effect somewhere.

    When I use SUD_DIRS wizards they always refer to "build" using "qmake" .

    I generally bypass both "buidl " or "qmake" by letting the IDE do its job and just use "Run".

    K 1 Reply Last reply
    0
    • A Anonymous_Banned275

      What are Qt definitions of these ?

      I believe there is an option to ""always use qmake " when using "build" or something to that effect somewhere.

      When I use SUD_DIRS wizards they always refer to "build" using "qmake" .

      I generally bypass both "buidl " or "qmake" by letting the IDE do its job and just use "Run".

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @AnneRanch

      "run qmake" does as it says. qmake produces makefiles which are used by compiler tool called generally "make". The make ensures the proper compilation in order. "run" does as says as well. However, changes are typically handled correctly and qmake/build will be called beforehand.

      Sometimes it may be required to start the different steps manually, when something happened or the project setup is not a 100% error free. That is the reason for some people are advising to "rerun qmake" and sometimes to do a complete "rebuild". Basically it is meant to ensure that everything has been handled correctly.

      Vote the answer(s) that helped you to solve your issue(s)

      A 1 Reply Last reply
      5
      • K koahnig

        @AnneRanch

        "run qmake" does as it says. qmake produces makefiles which are used by compiler tool called generally "make". The make ensures the proper compilation in order. "run" does as says as well. However, changes are typically handled correctly and qmake/build will be called beforehand.

        Sometimes it may be required to start the different steps manually, when something happened or the project setup is not a 100% error free. That is the reason for some people are advising to "rerun qmake" and sometimes to do a complete "rebuild". Basically it is meant to ensure that everything has been handled correctly.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @koahnig Allow me to rewrite your post.
        You are not answering the question - you are describing the functions , and their commonly used definitions. ( I am asking for difference , comparison of functions of "Build and "qmake".

        You explanation of "make " is fine.
        To reshuffle your post -
        "make" - in general , not specifically "qmake" prepares "makefile" for compiler to work on.

        "qmake" is a Qt version of "make" and still has same function .
        The "qmake" options are implemented in .pro file.

        To me it is still unclear how "(run) build " differs from (run) qmake.

        Is "Build " yet another layer - above "qmake"?

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

          Yes @koahnig answered your question.

          qmake is a project manager tool. It reads a .pro file and (re)generate Makefiles.

          make does not prepare anything, it reads Makefiles and execute whatever was defined in there.

          As @koahnig explained very well "Run qmake" is literally just that: execute qmake on your project which will generate or regenerate all the files required for "make" to do its job in the build folder.

          Build is: call make in the build folder.

          So no, make and qmake do not serve the same purpose. qmake is not Qt's implementation of make.

          For more information there is a dedicated chapter for qmake in Qt's documentation.

          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
          5
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by JKSH
            #5

            "build" versus "qmake" ?

            @AnneRanch This was answered at https://forum.qt.io/post/649204 -- Not in the exact format you asked for here, but it shows the link from "qmake" to "build".

            "qmake" is a Qt version of "make" and still has same function .

            Wrong. Read https://forum.qt.io/post/649204 carefully.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            A 1 Reply Last reply
            2
            • JKSHJ JKSH

              "build" versus "qmake" ?

              @AnneRanch This was answered at https://forum.qt.io/post/649204 -- Not in the exact format you asked for here, but it shows the link from "qmake" to "build".

              "qmake" is a Qt version of "make" and still has same function .

              Wrong. Read https://forum.qt.io/post/649204 carefully.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @JKSH
              I am still trying to relate all of this to SUB_DIRS.
              And still missing parts.

              Starting with
              New project ...
              choose template
              Other projects
              Subdir project
              selecting (main) project

              Now I have
              .pro file created by ???

              At this point I can execute project ->Run
              and if the "main" project selected is "window" based
              I get a window on my desktop.

              Executing "Run" actually
              qmake "reads " .pro file and builds "makefile"
              "build" uses "make" which reads "makefile"
              and then compiler does its job and last the linker takes its turn.

              Does that makes sense or not ?
              Did I missed some part?

              I am not trying to be smart , I am trying to understand how these piece parts manage basic C header / source relationship in SUB_DIRS concept.

              At present it appears that header / source pair will compile using "include header" -normal - , but "header" is duplicated in .pro file . Sort of "upstream ".

              .

              JKSHJ 1 Reply Last reply
              1
              • A Anonymous_Banned275

                @JKSH
                I am still trying to relate all of this to SUB_DIRS.
                And still missing parts.

                Starting with
                New project ...
                choose template
                Other projects
                Subdir project
                selecting (main) project

                Now I have
                .pro file created by ???

                At this point I can execute project ->Run
                and if the "main" project selected is "window" based
                I get a window on my desktop.

                Executing "Run" actually
                qmake "reads " .pro file and builds "makefile"
                "build" uses "make" which reads "makefile"
                and then compiler does its job and last the linker takes its turn.

                Does that makes sense or not ?
                Did I missed some part?

                I am not trying to be smart , I am trying to understand how these piece parts manage basic C header / source relationship in SUB_DIRS concept.

                At present it appears that header / source pair will compile using "include header" -normal - , but "header" is duplicated in .pro file . Sort of "upstream ".

                .

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by JKSH
                #7

                @AnneRanch said in "build" versus "qmake" ? ( question ):

                qmake "reads " .pro file and builds "makefile"

                Yes. (But don't use the word "build" here -- it just makes things confusing)

                "build" uses "make" which reads "makefile"

                Yes. The Makefile contains the instructions for the build process.

                and then compiler does its job and last the linker takes its turn.

                Yes. You have described the building process.

                Did I missed some part?

                You missed the last part: "Run" actually runs the built file -- hence the name.

                I am trying to understand how these piece parts manage basic C header / source relationship in SUB_DIRS concept.

                At present it appears that header / source pair will compile using "include header" -normal - , but "header" is duplicated in .pro file . Sort of "upstream ".

                You're not supposed to have duplicated headers in a SUBDIRS hierarchy. Something doesn't sound right.

                But this is really a separate concept from "build" and "qmake". It sounds like you need to learn the difference between using a "header that comes from your current project" versus using a "header that comes from a library".

                Can you explain the difference, in your own words?

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                A 2 Replies Last reply
                2
                • JKSHJ JKSH

                  @AnneRanch said in "build" versus "qmake" ? ( question ):

                  qmake "reads " .pro file and builds "makefile"

                  Yes. (But don't use the word "build" here -- it just makes things confusing)

                  "build" uses "make" which reads "makefile"

                  Yes. The Makefile contains the instructions for the build process.

                  and then compiler does its job and last the linker takes its turn.

                  Yes. You have described the building process.

                  Did I missed some part?

                  You missed the last part: "Run" actually runs the built file -- hence the name.

                  I am trying to understand how these piece parts manage basic C header / source relationship in SUB_DIRS concept.

                  At present it appears that header / source pair will compile using "include header" -normal - , but "header" is duplicated in .pro file . Sort of "upstream ".

                  You're not supposed to have duplicated headers in a SUBDIRS hierarchy. Something doesn't sound right.

                  But this is really a separate concept from "build" and "qmake". It sounds like you need to learn the difference between using a "header that comes from your current project" versus using a "header that comes from a library".

                  Can you explain the difference, in your own words?

                  A Offline
                  A Offline
                  Anonymous_Banned275
                  wrote on last edited by
                  #8

                  @JKSH OK, it is beginning to gel. I am going on my morning walk and will have about an hour to think about all what was said so far.
                  Later

                  1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    @AnneRanch said in "build" versus "qmake" ? ( question ):

                    qmake "reads " .pro file and builds "makefile"

                    Yes. (But don't use the word "build" here -- it just makes things confusing)

                    "build" uses "make" which reads "makefile"

                    Yes. The Makefile contains the instructions for the build process.

                    and then compiler does its job and last the linker takes its turn.

                    Yes. You have described the building process.

                    Did I missed some part?

                    You missed the last part: "Run" actually runs the built file -- hence the name.

                    I am trying to understand how these piece parts manage basic C header / source relationship in SUB_DIRS concept.

                    At present it appears that header / source pair will compile using "include header" -normal - , but "header" is duplicated in .pro file . Sort of "upstream ".

                    You're not supposed to have duplicated headers in a SUBDIRS hierarchy. Something doesn't sound right.

                    But this is really a separate concept from "build" and "qmake". It sounds like you need to learn the difference between using a "header that comes from your current project" versus using a "header that comes from a library".

                    Can you explain the difference, in your own words?

                    A Offline
                    A Offline
                    Anonymous_Banned275
                    wrote on last edited by
                    #9

                    @JKSH OK
                    in general /generic terms "files are created" would be more appropriate.

                    You missed the last part: "Run" actually runs the built file -- hence the name.

                    Where did the "build " file came from ?

                    I think it would be helpful to separate process and "object" of the process - if feasible.
                    In a essence :
                    make (object) reads ( process) makefile ( object)

                    I am not sure to get hung up in semantics - I am still looking for simple one on one relations type "cause" -> "result".

                    JKSHJ 1 Reply Last reply
                    0
                    • A Anonymous_Banned275

                      @JKSH OK
                      in general /generic terms "files are created" would be more appropriate.

                      You missed the last part: "Run" actually runs the built file -- hence the name.

                      Where did the "build " file came from ?

                      I think it would be helpful to separate process and "object" of the process - if feasible.
                      In a essence :
                      make (object) reads ( process) makefile ( object)

                      I am not sure to get hung up in semantics - I am still looking for simple one on one relations type "cause" -> "result".

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #10

                      @AnneRanch said in "build" versus "qmake" ? ( question ):

                      Where did the "build " file came from ?

                      The "build file" is the end result of whole build process.

                      You start with source code and end with an executable program (or a library).

                      I think it would be helpful to separate process and "object" of the process - if feasible.
                      In a essence :
                      make (object) reads ( process) makefile ( object)

                      I am not sure to get hung up in semantics - I am still looking for simple one on one relations type "cause" -> "result".

                      I'll split what you called "objects" into "tools" and "inputs"/"outputs". Tools read inputs and write outputs.

                      Tool Input Process Output
                      qmake .pro/.pri files Converts Qt configuration in the .pro file into build instructions in the Makefile Makefile
                      make Makefile Carries out the build instructions in the Makefile; Runs the tools specified by those instructions (like the Compiler and Linker) (none)
                      Compiler Human-readable source code (.cpp/.h files) Converts human-readable source code into machine code Machine-readable object files (.o files)
                      Linker .o files Combines all .o files into a single application (or library) Final executable file (or library file)

                      Once you understand all this, your next task is to figure out where moc and uic fits in the picture.

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      JonBJ 1 Reply Last reply
                      5
                      • JKSHJ JKSH

                        @AnneRanch said in "build" versus "qmake" ? ( question ):

                        Where did the "build " file came from ?

                        The "build file" is the end result of whole build process.

                        You start with source code and end with an executable program (or a library).

                        I think it would be helpful to separate process and "object" of the process - if feasible.
                        In a essence :
                        make (object) reads ( process) makefile ( object)

                        I am not sure to get hung up in semantics - I am still looking for simple one on one relations type "cause" -> "result".

                        I'll split what you called "objects" into "tools" and "inputs"/"outputs". Tools read inputs and write outputs.

                        Tool Input Process Output
                        qmake .pro/.pri files Converts Qt configuration in the .pro file into build instructions in the Makefile Makefile
                        make Makefile Carries out the build instructions in the Makefile; Runs the tools specified by those instructions (like the Compiler and Linker) (none)
                        Compiler Human-readable source code (.cpp/.h files) Converts human-readable source code into machine code Machine-readable object files (.o files)
                        Linker .o files Combines all .o files into a single application (or library) Final executable file (or library file)

                        Once you understand all this, your next task is to figure out where moc and uic fits in the picture.

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #11

                        @JKSH
                        That it a pretty, well-laid out table! I don't even know how you achieve that from making a post here, I don't see any command-icon for that at all!?

                        JKSHJ 1 Reply Last reply
                        0
                        • JonBJ JonB

                          @JKSH
                          That it a pretty, well-laid out table! I don't even know how you achieve that from making a post here, I don't see any command-icon for that at all!?

                          JKSHJ Offline
                          JKSHJ Offline
                          JKSH
                          Moderators
                          wrote on last edited by
                          #12

                          @JonB said in "build" versus "qmake" ? ( question ):

                          That it a pretty, well-laid out table!

                          Why thank you :-D

                          I don't even know how you achieve that from making a post here, I don't see any command-icon for that at all!?

                          The forum supports Markdown syntax: https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf (Tables on the bottom-right corner of Page 2)

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                          1 Reply Last reply
                          2

                          • Login

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