VS2022 Qt5.15.2 build static from source ERROR
-
cmd:
SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
SET SRC_DIR="C:\Work\Qt\5.15.2\Src"
SET BUILD_DIR="C:\Work\Qt\5.15.2\Build"
SET INSTALL_DIR="C:\Work\Qt\5.15.2\msvc2019_64_static_size"
SET CONFIGURE_OPTIONS=-platform win32-msvc -release -mp -opensource -confirm-license -static -static-runtime -optimize-sizecall %VS_ENVIRONMENT%
mkdir %BUILD_DIR%
mkdir %INSTALL_DIR%
cd %BUILD_DIR%
call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
cmake --build . --parallel
cmake --install .
cmake --install . --config Debug
cd %INSTALL_DIR%
rmdir %BUILD_DIR% /Q /S
pausereturn:
Qt6.3 I can reconstruct it perfectly, but it does not support win7, so I want to try 5.15.2
-
Qt 5 is not built with cmake :) Do what the configure output suggest, and just run "nmake" (or jom.exe, if you want faster builds).
cd C:\Work\Qt\5.15.2\Src
configure.bat -platform win32-msvc -release -mp -opensource -confirm-license -static -static-runtime -optimize-size -prefix "C:\Work\Qt\5.15.2\msvc2019_64_static_size"
return:
Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Work\Qt\5.15.2\msvc2019_64_static_size'.Prior to reconfiguration, make sure you remove any leftovers from
the previous build.I went on :nmake
return:
'cmd' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fata1 error U1077:return code "0x2"
NMAKE : fata1 error U1077:"cd":return code "0x2"