[Qt-creator] Qt Creator 4.3.0, Qt 5.9.0: problems with cmake support

Eike Ziller Eike.Ziller at qt.io
Fri Jun 2 11:21:10 CEST 2017


Thanks for the additional information.
I’m able to reproduce your issue.

It looks like Qt Creator passes a wrong CMAKE_CXX_COMPILER setting in this specific case, even though the compilers are set up in the kit.
When I go to "Tools > Options > Build & Run > Kits" and either remove the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER entries from the “CMake Configuration”,
or set them to just “cl.exe” or the absolute path to cl.exe, then configuration works for my dummy CMake based project.

Br, Eike

> On Jun 2, 2017, at 10:39 AM, Helmut Mülner <helmut.muelner at gmail.com> wrote:
> 
> On Jun 1, 2017 18:19, "Helmut Mülner" <helmut.muelner at gmail.com> wrote:
>>> Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{cdb7ec38-096b-4a3d-9b84-fc91923889d4}" --experimental" in C:\Users\mue\AppData\Local\Temp\QtCreator-P1XkOA\qtc-cmake-XXF8mA7w.
>>> 
>>> The C compiler identification is unknown The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project):
>>> 
>>>   No CMAKE_C_COMPILER could be found.
>>> 
> Does your project contain files that need to be built with a c compiler? You might want to tell cmake not to bother checking for one if not:-) PROJECT has a way to do that.
>  
> This is not relevant here. The Microsoft-C-Compiler is always the same as the Microsoft-C++-Compiler.
>  
> The stuff is in profiles.xml. Do not bother to delete that, just fix it!
>  
> The profiles.xml looks ok as far as I can tell.
>  
> In QtCreator I have the following kits:
> -       Qt 5.8.0 (msvc2013)
> -       Qt 5.8.0 (msvc2013-64)
> -       Qt 5.9.0 (msvc2013-64)
> -       Qt 5.9.0 (msvc2015(
> -       Qt 5.9.0 (msvc2015_64)
> -       Qt 5.9.0 (msvc2017-64)
>  
> All of them except the last one work with the QtCreator cmake integration.
> All of them (including msvc2017-64)  work with qmake.
>  
> If I open a VS2017 developer console and run cmake (or cmake-gui) there I can generate a working VS2017 solution.
>  
> I suspect that QtCreator does not set up the environment correctly before calling cmake.
> I also tried to start QtCreator from a VS2017 developer console, but this also did not work.
> Also tried the “x64 Native Tools Command Prompt for VS 2017” and started QtCreator from there – without success.
>  
> I always get this output:
>  
> Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{7fc4b436-7358-4002-8feb-2380442290e4}" --experimental" in C:\Users\mue\AppData\Local\Temp\QtCreator-bE7tFd\qtc-cmake-XXqOkacn.
> The C compiler identification is unknown
> The CXX compiler identification is unknown
> CMake Error at CMakeLists.txt:3 (project):
> No CMAKE_C_COMPILER could be found.
>  
> Tell CMake where to find the compiler by setting either the environment
> variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
> the compiler, or to the compiler name if it is in the PATH.
>  
>  
> CMake Error at CMakeLists.txt:3 (project):
> No CMAKE_CXX_COMPILER could be found.
>  
> Tell CMake where to find the compiler by setting either the environment
> variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
> to the compiler, or to the compiler name if it is in the PATH.
>  
>  
> Configuring incomplete, errors occurred!
> See also "C:/Users/mue/AppData/Local/Temp/QtCreator-bE7tFd/qtc-cmake-XXqOkacn/CMakeFiles/CMakeOutput.log".
> See also "C:/Users/mue/AppData/Local/Temp/QtCreator-bE7tFd/qtc-cmake-XXqOkacn/CMakeFiles/CMakeError.log".
>  
> If I use the “x64 Native Tools Command Prompt for VS 2017” and go to the Temp folder with the error logs, there is a subfolder “3.8.2”
> With two subfolders for the compiler checks.
> When I do “cl -c CMakeCCompilerId.c” I get the output:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
>  
> CMakeCCompilerId.c
>  
>  
> And with “cl -c CMakeCXXCompilerId.cpp”:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
>  
> CMakeCXXCompilerId.cpp
>  
> My conclusion: QtCreator/cmake did not find the compiler.
>  
> The BOOST mailing list had some discussion about problems with VS2017 some weeks ago.
> Some links:
> https://lists.boost.org/Archives/boost/2017/04/234552.php
> https://lists.boost.org/Archives/boost/2017/03/234024.php
> https://lists.boost.org/Archives/boost/2017/02/232805.php
>  
> Cheers,
> Helmut
>  
>  
>  
>  
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list