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. Qt app build from command line
Forum Updated to NodeBB v4.3 + New Features

Qt app build from command line

Scheduled Pinned Locked Moved Solved General and Desktop
qmaknmakecmd
13 Posts 3 Posters 2.3k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    Is your visual studio up to date?

    (Z(:^

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

      Please confirm you setup the command prompt in the bottom screen shot and then ran the build in the top screen shot from the same command prompt. These observations cast some doubt here:

      • The text is different colours in the bottom versus build command prompts
      • The environment setup lists version VS2017 v15.9.12. The nmake utility is reporting v14.16.27013.1. Visual Studio 2015 would be V14.x;
      S 1 Reply Last reply
      2
      • S Offline
        S Offline
        sayan275
        wrote on last edited by
        #4

        MS Visual Studio 2017 pro version installed.
        I haven't done any update after the installation. With current version am able to build by Qt creator perfectly fine.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #5

          As @ChrisW67 mentioned, your first 2 screenshots suggest the terminal is actually using MSVC 2015, which is too old.

          Make sure you run vcvarsall.bat from MSVS 2017 in the same terminal session where you want to compile.

          (Z(:^

          1 Reply Last reply
          2
          • C ChrisW67

            Please confirm you setup the command prompt in the bottom screen shot and then ran the build in the top screen shot from the same command prompt. These observations cast some doubt here:

            • The text is different colours in the bottom versus build command prompts
            • The environment setup lists version VS2017 v15.9.12. The nmake utility is reporting v14.16.27013.1. Visual Studio 2015 would be V14.x;
            S Offline
            S Offline
            sayan275
            wrote on last edited by
            #6

            @ChrisW67 yes...seems an issue, am trying to find the v15.x specific bat and exe to build.
            And am updating the VS to MSVC 15.9.38.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sayan275
              wrote on last edited by
              #7

              jom.exe is also not able to build as cl.exe is not able to be found.....
              5fc66101-7a48-4953-a52c-22398d5a4351-image.png

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #8

                To reiterate: you have to run vcvarsall.bat in the same session you run qmake. That means the same cmd.exe window, same execution rights (not admin!). When you close session (close window or type exit), your build environment will be forgotten. This is so by design.

                m trying to find the v15.x specific bat and exe to build.

                Exact path is printed in your 3rd screenshot.

                (Z(:^

                S 1 Reply Last reply
                4
                • sierdzioS sierdzio

                  To reiterate: you have to run vcvarsall.bat in the same session you run qmake. That means the same cmd.exe window, same execution rights (not admin!). When you close session (close window or type exit), your build environment will be forgotten. This is so by design.

                  m trying to find the v15.x specific bat and exe to build.

                  Exact path is printed in your 3rd screenshot.

                  S Offline
                  S Offline
                  sayan275
                  wrote on last edited by
                  #9

                  @sierdzio ok I'll do an exit at end to close and to try to build.
                  Some issue vs version installed in my system. Am not find the folder with v15.9.XXX
                  C:\LegacyApp\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\nmake,exe
                  C:\LegacyApp\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat

                  These are added in ENV var PATH.

                  another nmake I found in this location.
                  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

                  sierdzioS 1 Reply Last reply
                  0
                  • S sayan275

                    @sierdzio ok I'll do an exit at end to close and to try to build.
                    Some issue vs version installed in my system. Am not find the folder with v15.9.XXX
                    C:\LegacyApp\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\nmake,exe
                    C:\LegacyApp\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat

                    These are added in ENV var PATH.

                    another nmake I found in this location.
                    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

                    sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #10

                    @sayan275 said in Qt app build from command line:

                    @sierdzio ok I'll do an exit at end to close and to try to build.

                    ?? I've told you to do the exact opposite. Anyway, just try it out.

                    Some issue vs version installed in my system. Am not find the folder with v15.9.XXX

                    But the screenshot clearly shows VS 15.9.12 residing in: C:\LegacyApp\Microsoft Visual Studio\VC\Auxiliary\Build

                    (Z(:^

                    S 1 Reply Last reply
                    0
                    • sierdzioS sierdzio

                      @sayan275 said in Qt app build from command line:

                      @sierdzio ok I'll do an exit at end to close and to try to build.

                      ?? I've told you to do the exact opposite. Anyway, just try it out.

                      Some issue vs version installed in my system. Am not find the folder with v15.9.XXX

                      But the screenshot clearly shows VS 15.9.12 residing in: C:\LegacyApp\Microsoft Visual Studio\VC\Auxiliary\Build

                      S Offline
                      S Offline
                      sayan275
                      wrote on last edited by
                      #11

                      @sierdzio said in Qt app build from command line:

                      15.9.12 r
                      Thank you all.

                      Yes tried all in same console and it worked.
                      3b79fdfd-461d-42de-8d10-556d813f2d1b-image.png

                      But not able understand the version difference with folders and what's getting on console.

                      sierdzioS 1 Reply Last reply
                      0
                      • S sayan275

                        @sierdzio said in Qt app build from command line:

                        15.9.12 r
                        Thank you all.

                        Yes tried all in same console and it worked.
                        3b79fdfd-461d-42de-8d10-556d813f2d1b-image.png

                        But not able understand the version difference with folders and what's getting on console.

                        sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #12

                        @sayan275 said in Qt app build from command line:

                        Yes tried all in same console and it worked.

                        Nice!

                        But not able understand the version difference with folders and what's getting on console.

                        You mean that it sometimes loads VS 2015 and sometimes 2017? Yeah that's pretty weird. You'll need to search through your disk to find real concrete paths to both of your compilers.

                        (Z(:^

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

                          If the VS 2015 executables are in the default system PATH then this is the result I would expect from a normal CMD shell. I expect that after running vcvarsall in that CMD shell its PATH will have the VS 2017 binary directory inserted before the VS 2015 ones.

                          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