Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?



  • Hello!
    I am facing this problem while trying to install qwt.
    The command "qmake qwt.pro" gives me the aforementioned error.
    I understood that it probably has to do with the environment, so I added to the environment variables the path to the qmake (C:\Qt\Qt5.9.1\5.9.1\msvc2015_64\bin) as well as the path to the vcvarsall.bat (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC), but I still have this problem.

    Any help?
    Thanks a lot in advance!

    [Edit: moved to 3rd Party Software ~~ @Wieland]


  • Moderators

    @vassia

    Hi and welcome to devnet forum

    @vassia said in Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?:

    I understood that it probably has to do with the environment, so I added to the environment variables the path to the qmake (C:\Qt\Qt5.9.1\5.9.1\msvc2015_64\bin) as well as the path to the vcvarsall.bat (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC), but I still have this problem.

    I might be wrong, but it looks to me that you are using a pre-compiled Qt version for MSVC 2015 64 bit.
    Based on the path you appear to have Visual Studio 2015 32 bit. Please verify, if those assumptions are correct.

    You cannot freely mix 32 bit and 64 bit versions. This could be the problem in your setup.

    Please ensure that compiler and pre-compiled Qt library version are for the same architecture. Either 32 or 64 bit.



  • Thank you very much for the reply!
    Everything you wrote was correct. Indeed I have Qt for both MSVC 2015 64 bit and MSVC 2015 (32 bit). I finally succeeded to install qwt.
    So, the steps I followed in order to install qwt-6.1.3 (in case someone faces the same problem) are:

    1. extracted Qwt source zip file to: C:\Qwt-6.1.3
    2. ran as administrator "Qt 5.7 64-bit for Desktop (MSVC 2015)"
    3. moved into: cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
    4. then executed: vcvarsall.bat amd64
    5. then moved into Qwt folder: cd C:\Qwt-6.1.3
    6. ran: qmake qwt.pro
    7. then ran: nmake
    8. and finally ran: nmake install

    Thanks again!


  • Moderators

    @vassia

    Thanks for reply and good to know that I could help.

    Since the issue has been solved for you, please mark also your post as solved. This helps others to see that there might be a solution.

    In order to mark as solved, go to the compobox named "Topic Tools" after your first post or after the last post in the thread and select "Mark as Solved".


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.