Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.13.2
-
Windows 10, Qt 5.15.1, VS 2019 16.7.6, Qt creator 4.13.2
Description
I have encoding errors with CMake output.
It makes it hard to understand why the build doesn't work (ex : bad platform passed to CMake, bad target invoked, etc.). MSBuild output is in French and is incomprehensible (MS made very bad translations).
The option Force UTF-8 MSVC compiler output has an effect but doesn't remove encoding errors.
I have written a little test program to show error messages in different cases :
int main(int argc, char *argv[]) { "\é"; // <= generates a compiler warning which should contain 'é', however the caracter is broken in compiler output. Instead, an ASCII letter would have made its way to the compiler ouput. return 0; }
---------------------
Bad string literal in code with "Ninja" :
23:50:18: Exécution des étapes pour le projet untitled4...
23:50:18: Débute : "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build . --target untitled4
[1/2 1.1/sec] Building CXX object CMakeFiles\untitled4.dir\main.cpp.obj
C:\dev\untitled4\main.cpp(6): warning C4129: '': unrecognized character escape sequence
[2/2 1.9/sec] Linking CXX executable untitled4.exe
23:50:19: Le processus "C:\Qt\Tools\CMake_64\bin\cmake.exe" s'est terminé normalement.
23:50:19: Elapsed time: 00:01.
---------------------
Bad platform <unsupported> with "Visual Studio 16 2019" (MSBuild) :
Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/dev/untitled4 -B C:/dev/build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug "-A<unsupported>" "-T<unsupported>" "-GVisual Studio 16 2019" "-DCMAKE_BUILD_TYPE:String=Debug" "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/5.15.1/msvc2019_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/5.15.1/msvc2019_64" "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/HostX64/x64/cl.exe" in C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug.
– Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.7.0+b89cb5fde pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits réservés.
La génération a démarré 30/10/2020 23:58:20.
Projet "C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\CMakeFiles\3.18.3\VCTargetsPath.vcxproj" sur le noud 1 (cibles par défaut).
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(3293,5): error MSB4184: impossible d'évaluer l'expression "[System.IO.Path]::Combine(obj\<unsupported>\Debug\, .NETFramework,Version=v4.0.AssemblyAttributes.cpp)". Caractères non conformes dans le chemin d'accès. [C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\CMakeFiles\3.18.3\VCTargetsPath.vcxproj]
Génération du projet "C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\CMakeFiles\3.18.3\VCTargetsPath.vcxproj" terminée (cibles par défaut) – ÉCHEC.
ÉCHEC de la build.
"C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\CMakeFiles\3.18.3\VCTargetsPath.vcxproj" (cible par défaut) (1) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(3293,5): error MSB4184: impossible d'évaluer l'expression "[System.IO.Path]::Combine(obj\<unsupported>\Debug\, .NETFramework,Version=v4.0.AssemblyAttributes.cpp)". Caractères non conformes dans le chemin d'accès. [C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\CMakeFiles\3.18.3\VCTargetsPath.vcxproj]
0 Avertissement(s)
1 Erreur(s)
Temps écoulé 00:00:00.06
Exit code: 1
– Configuring incomplete, errors occurred!
See also "C:/dev/build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug/CMakeFiles/CMakeOutput.log".
CMake process exited with exit code 1.
Elapsed time: 00:00.
---------------------
Bad target when building with "Visual Studio 16 2019" (MSBuild) :
23:52:05: Exécution des étapes pour le projet untitled4...
23:52:07: Persisting CMake state...
23:52:07: Débute : "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build . --target all
Microsoft (R) Build Engine version 16.7.0+b89cb5fde pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits r�serv�s.
MSBUILD : error MSB1009: Le fichier projet n'existe pas.
Commutateur�:�all.vcxproj
23:52:07: Le processus "C:\Qt\Tools\CMake_64\bin\cmake.exe" s'est terminé avec le code 1.
Erreur lors de la compilation/déploiement du projet untitled4 (kit : Desktop Qt 5.15.1 MSVC2019 64bit)
When executing step "Build"
23:52:07: Elapsed time: 00:03.
---------------------
Bad string literal in code with "Visual Studio 16 2019" (MSBuild) :
23:55:23: Exécution des étapes pour le projet untitled4...
23:55:23: Débute : "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build . --target ALL_BUILD
Microsoft (R) Build Engine version 16.7.0+b89cb5fde pour .NET Framework
Copyright (C) Microsoft Corporation. Tous droits r�serv�s.
Automatic MOC and UIC for target untitled4
main.cpp
C:\dev\untitled4\main.cpp(6,5): warning C4129: '': unrecognized character escape sequence [C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\untitled4.vcxproj]
untitled4.vcxproj -> C:\dev\build-untitled4-Desktop_Qt_5_15_1_MSVC2019_64bit-Debug\Debug\untitled4.exe
23:55:25: Le processus "C:\Qt\Tools\CMake_64\bin\cmake.exe" s'est terminé normalement.
23:55:25: Elapsed time: 00:02.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-316 National compiler error messages unreadable
- Closed