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. How to generate .pro.user from command line?
Forum Updated to NodeBB v4.3 + New Features

How to generate .pro.user from command line?

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 3 Posters 1.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.
  • Tom assoT Offline
    Tom assoT Offline
    Tom asso
    wrote on last edited by
    #1

    I have a .pro file, and I want to generate an accompanying .pro.user file, without using qtcreator. Is there a way to generate the .pro.user file using 'qmake'? qmake with no options generates a Makfile from the .pro file, but the generated Makefile doesn't contain the 'moc' commands to build the moc_* files. I haven't been able to find a qmake option that will do this...

    Thanks!

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

      Hi,

      No, that file is Qt Creator specific an contains only information that pertains to Qt Creator.

      It has nothing to do with generating moc files.

      What is your exact issue ?

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

      Tom assoT 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        No, that file is Qt Creator specific an contains only information that pertains to Qt Creator.

        It has nothing to do with generating moc files.

        What is your exact issue ?

        Tom assoT Offline
        Tom assoT Offline
        Tom asso
        wrote on last edited by
        #3

        @SGaist - I want to build a Qt project using only command line tools, without the need to use qtcreator. This is proving to be a real struggle for me. First I developed my app with qtcreator and qmake - it builds fine. Now to test building without qtcreator I've copied my .cpp, .h, .qml, qml.qrc and .pro files to a separate directory. In that directory I type 'qmake' to generate a Makefile, but the project does not properly build. Comparing the Makefiles generated in the original (qtcreator) directory and the test (qmake-only) directory, there are many differences. In particular the original Makefile includes '-I /usr/local/include' in its compilation flags, but the test directory Makefile does not - one reason why building in the test directory fails.
        I assume I have not copied some file needed by qmake to build a working Makefile, but what?
        Thanks

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

          Are you sure you are using the same qmake executable ?
          A recommandation is to always use the full path to the executable.

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

          Tom assoT 1 Reply Last reply
          1
          • SGaistS SGaist

            Are you sure you are using the same qmake executable ?
            A recommandation is to always use the full path to the executable.

            Tom assoT Offline
            Tom assoT Offline
            Tom asso
            wrote on last edited by Tom asso
            #5

            @SGaist - Yes, 'which qmake' shows I am using the same qmake in both cases.
            Looking for a clue, I opened qtcreator in the test directory, and get this error message:

            All settings files found in directory "/home/oreilly/projects/mb-system/MB-System/src/qttest/mbgrdviz-2.pro.user" were unsuitable for the current version of Qt Creator, for instance because they were written by an incompatible version of Qt Creator, or because a different settings path was used.
            

            So, why does qtcreator give this warning? I don't understand how it "knows" a different settings path was used. I am thinking this is one cause of my problem...

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

              What errors are you getting ?

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

              Tom assoT 1 Reply Last reply
              0
              • SGaistS SGaist

                What errors are you getting ?

                Tom assoT Offline
                Tom assoT Offline
                Tom asso
                wrote on last edited by
                #7

                @SGaist - The Makefile generated by qmake in the test directory does not include /usr/local/include in its compilation flags, whereas the qmake-generated Makefile in the original directory does. So the compiler cannot find headers in /usr/local/include.

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

                  That's typically a folder that you should add to the INCLUDEPATH variable 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

                  Tom assoT 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    That's typically a folder that you should add to the INCLUDEPATH variable in your .pro file.

                    Tom assoT Offline
                    Tom assoT Offline
                    Tom asso
                    wrote on last edited by
                    #9

                    @SGaist - Thanks! How do I specify that "system" include directory in a platform-neutral way in the .pro file?

                    jsulmJ 1 Reply Last reply
                    0
                    • Tom assoT Tom asso

                      @SGaist - Thanks! How do I specify that "system" include directory in a platform-neutral way in the .pro file?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Tom-asso Like shown in documentation: https://doc.qt.io/qt-5/qmake-variable-reference.html#includepath

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      Tom assoT 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @Tom-asso Like shown in documentation: https://doc.qt.io/qt-5/qmake-variable-reference.html#includepath

                        Tom assoT Offline
                        Tom assoT Offline
                        Tom asso
                        wrote on last edited by
                        #11

                        @jsulm - I see, thank you @jsulm and @SGaist !

                        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