Error on Qt 6 Building from source for Windows Based
-
Let me show you CMakeError.log:
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" did not produce an executable in "C:/Qt/CMakeFiles/3.18.4/CompilerIdCXX".
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
** Visual Studio 2019 Developer Command Prompt v16.8.4
** Copyright (c) 2020 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: 'x64'
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
** Visual Studio 2019 Developer Command Prompt v16.8.4
** Copyright (c) 2020 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: 'x64'
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
Checking whether the ASM compiler is Clang using "--version" did not match "(clang version)":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
Checking whether the ASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
Checking whether the ASM compiler is ARMClang using "--version" did not match "armclang":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
Checking whether the ASM compiler is HP using "-V" did not match "HP C":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line error D8004 : '/V' requires an argument
Checking whether the ASM compiler is Intel using "--version" did not match "(ICC)":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
Checking whether the ASM compiler is SunPro using "-V" did not match "Sun C":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line error D8004 : '/V' requires an argument
Checking whether the ASM compiler is XL using "-qversion" did not match "XL C":
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.cl : Command line warning D9002 : ignoring unknown option '-qversion'
cl : Command line error D8003 : missing source filename
Detecting CXX compiler ABI info failed to compile with the following output:
Change Dir: C:/Qt/CMakeFiles/CMakeTmpRun Build Command(s):C:/ninja-win/ninja.exe cmTC_ea43b && [1/2] Building CXX object CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj
FAILED: CMakeFiles/cmTC_ea43b.dir/CMakeCXXCompilerABI.cpp.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\COMMUN~1\VC\AUXILI~1\Build\vcvars64.bat" -o CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\Program Files\CMake\share\cmake-3.18\Modules\CMakeCXXCompilerABI.cpp"
[ERROR:vcvarsall.bat] Invalid argument found : -o
[ERROR:vcvarsall.bat] Invalid argument found : CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj
[ERROR:vcvarsall.bat] Invalid argument found : -c
La syntaxe de la commande n'est pas correcte.
ninja: build stopped: subcommand failed.
-
My qt6vars.cmd:
REM Set up Microsoft Visual Studio 2019, where <arch> is amd64, x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
SET _ROOT=C:\Qt\Qt-6
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET _ROOT= -
@Lemat said in Error on Qt 6 Building from source for Windows Based:
"C:\PROGRA~2\Microsoft Visual Studio\2019\COMMUN~1\VC\AUXILI~1\Build\vcvars64.bat" -o CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\Program Files\CMake\share\cmake-3.18\Modules\CMakeCXXCompilerABI.cpp"
This looks strange. This should be the call to the compiler, but instead vcvars64.bat is called. Can you show your script you created as described in the link (qt6vars.cmd)?
-
My qt6vars.cmd:
REM Set up Microsoft Visual Studio 2019, where <arch> is amd64, x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
SET _ROOT=C:\Qt\Qt-6
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET _ROOT= -
@Lemat said in Error on Qt 6 Building from source for Windows Based:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
I'm not very familiar with Windows build environment, but is that OK?
I mean, it looks like the 64 bit version of cl.exe is being used, but it's strange that the Visual Studio installation went to the x86 folder, as a 32 bit application?Could you please describe your environment? i.e. Windows OS version and platform, same for Visual Studio.
-
Windows 10 Professional 20H2 19042.685 X64
Microsoft Visual Studio Community 2019
Version 16.8.4i use this same MSVC version to build my Qt x64 apps.
-
Hi,
IIRC, cmake 3.19.2 or newer is recommended but I don't have the source at hand.
-
You should update your cmake version.