Qt app build from command line
-
Is your visual studio up to date?
-
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;
-
To reiterate: you have to run
vcvarsall.bat
in the same session you runqmake
. That means the samecmd.exe
window, same execution rights (not admin!). When you close session (close window or typeexit
), 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.
-
@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
-
@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
-
@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.
-
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.