Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Creator Project Error: cannot run compiler 'cl'



  • Hello! Today I encountered a very weird situation with my Qt install: I cannot open/compile any existing Qt project because of the following error:

    Running Windows Runtime device detection.
    No winrtrunner.exe found.
    Project ERROR: Cannot run compiler 'cl'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file D:\Works\Repos\bitbucket\unitbv-ia-2-2\gpdi\teme\tema2\grafica-poligon\grafica-poligon.pro. Giving up.
    

    The thing is: I haven't touched Qt for a night. When I started my laptop in the morning it wasn't working. I don't know if VS updated in the meantime, but it sure did break something. I tried reinstalling VS/Qt with no success.

    I am on Qt 5.10.1 with Visual Studio 2017 x64.

    This is my Kits tab:
    0_1520466765892_c87e1865-e7eb-4b51-a618-2377af3a9970-image.png

    In the Issues tab it complains about vcvarsall.bat, but I can run that file without any issues.
    0_1520466834006_bd3ec514-c844-40b6-9191-b2985249bb4b-image.png

    What is wrong with my installation of Qt?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I'd search for the chcp application and then check whether the PATH environment variable contains the folder where it is located.

    Hope it helps



  • chcp is an application that resides in C:\Windows\system32. I have added that directory to the PATH environment variable and everything is working again. Thank you!

    My question is: why? Do you have this folder in PATH (because it feels a little suspicious to have it there)? If no, why did I have to add it? If yes, what the hell happened there?


  • Qt Champions 2019

    @Opptur On my Windows 7 machine C:\Windows\system32 is in PATH. Which Windows version do you have?



  • Windows 10 Education x64 updated to date.



  • @Opptur
    Just now worked for me too the below suggestion :)
    I Ran my first QML application "Hello World" :)
    chcp is an application that resides in C:\Windows\system32. I have added that directory to the PATH environment variable and everything is working again. Thank you!


Log in to reply