Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot Run Compiler 'cl'
Forum Updated to NodeBB v4.3 + New Features

Cannot Run Compiler 'cl'

Scheduled Pinned Locked Moved Solved Installation and Deployment
22 Posts 6 Posters 49.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Might be a silly question but are you sure you installed the VS2015 package of Qt 5.9.1 ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • webzoidW Offline
      webzoidW Offline
      webzoid
      wrote on last edited by
      #3

      Hi, I've already had the same thought.

      But yes, the VS2015 package has been installed - for all versions of Qt on my machine.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Then you should go in the Build and Run panel in the preferences and check if everything is ok with your Kits.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        webzoidW 1 Reply Last reply
        0
        • SGaistS SGaist

          Then you should go in the Build and Run panel in the preferences and check if everything is ok with your Kits.

          webzoidW Offline
          webzoidW Offline
          webzoid
          wrote on last edited by
          #5

          I've already done that - see my first post, the kits are coming up with those warnings.

          When I switch to the CMake tab, there are no cmakes detected - but there were none previously prior to my Qt update.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            cmake is innocent.

            Can you show a picture of your Kits, Qt versions and compiler panels ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • webzoidW Offline
              webzoidW Offline
              webzoid
              wrote on last edited by webzoid
              #7

              As requested, here are links to screen captures taken from Qt Creator:

              Qt Kits - https://drive.google.com/open?id=0Bw0lw24F4HvodExlT3J6eDRTSk0

              Qt Compilers - https://drive.google.com/open?id=0Bw0lw24F4HvoaXctQkQtc3Bsd0E

              Qt Build & Run - https://drive.google.com/open?id=0Bw0lw24F4HvoZ3pBWjZ1RUROUmM

              Ignore the 5.9.1 MSVC2013 kit - I haven't got the correct Visual Studio compiler installed for that one.

              1 Reply Last reply
              1
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Another strange thing is that you have the x64 debugger selected for your 32bit Qt build.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • webzoidW Offline
                  webzoidW Offline
                  webzoid
                  wrote on last edited by webzoid
                  #9

                  Good point although I'd be happy if I could get to the debugging phase. As soon as I click build (qmake runs fine), the error appears and I can do nothing else.

                  Maybe I'll reinstall Visual Studio...

                  I've already tried reinstalling Qt but this made no difference.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Still the same error ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    webzoidW 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Still the same error ?

                      webzoidW Offline
                      webzoidW Offline
                      webzoid
                      wrote on last edited by
                      #11

                      Yep, exactly the same error... bizarre

                      webzoidW 1 Reply Last reply
                      0
                      • webzoidW webzoid

                        Yep, exactly the same error... bizarre

                        webzoidW Offline
                        webzoidW Offline
                        webzoid
                        wrote on last edited by
                        #12

                        Ok, so something I've just discovered.

                        Under the Options -> Qbs ->Profiles, when I select the 5.9.1 MSVC2015 32-bit kit and I examine the cpp values, the compilerName is empty as is the toolchainInstallPath. Incidentally, on another machine which works these values are set to cl.exe and the VC/Bin path of the Visual Studio directory.

                        The question is, how would one change these values?

                        webzoidW 1 Reply Last reply
                        0
                        • webzoidW webzoid

                          Ok, so something I've just discovered.

                          Under the Options -> Qbs ->Profiles, when I select the 5.9.1 MSVC2015 32-bit kit and I examine the cpp values, the compilerName is empty as is the toolchainInstallPath. Incidentally, on another machine which works these values are set to cl.exe and the VC/Bin path of the Visual Studio directory.

                          The question is, how would one change these values?

                          webzoidW Offline
                          webzoidW Offline
                          webzoid
                          wrote on last edited by
                          #13

                          Meh, it makes no difference - managed to change the values to reflect that of my working system but it still doesn't work. I also installed cmake to reduce the number of differences but again, doesn't fix the issue.

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            Just realised something, you have a QBS project failing ?

                            If so, does a classic qmake project work ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            webzoidW 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Just realised something, you have a QBS project failing ?

                              If so, does a classic qmake project work ?

                              webzoidW Offline
                              webzoidW Offline
                              webzoid
                              wrote on last edited by
                              #15

                              It is a Qt Widgets application that is failing - I'm not certain what a Qbs project is. I was purely looking for differences between a known working Qt setup and my current setup.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                It's a project using the QBS project manager rather than qmake.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • B Offline
                                  B Offline
                                  Brian Dolan
                                  wrote on last edited by
                                  #17

                                  Hi webzoid,

                                  I don't have an exact solution for you, but maybe some helpful information:

                                  I just encountered a very similar problem - we have a command line build and somewhat-complex make system here which calls qmake, etc. via a command line. This make system was built around Qt 5.5.1, and uses the "win32-msvc2015" make spec (e.g. qmake -spec win32-msvc2015). I attempted to use the latest Qt 5.9.1, and our make system failed because the Qt "mkspecs" folder in Qt 5.9.1 now contains a single "win32-msvc" folder, instead of separate "win32-msvc2005", "win32-msvc2008", "win32-msvc2010", "win32-msvc2012", "win32-msvc2013", and "win32-msvc2015" folders as it did in Qt 5.5.1.

                                  I attempted to do some copying/pasting/renaming of folders in order to get our existing make system to build with Qt 5.9.1 (without editing our make system, for reasons I won't get into), but was not successful - the build got farther, past the "Could not find qmake configuration file win32-msvc2015" error I had been seeing, but hit an error similar to what you are seeing: "Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?".

                                  In the end, it was not important for me to use the absolute latest version (Qt 5.9.1), and instead I worked around the problem by just using Qt 5.6.2 instead, which has a folder structure similar to Qt 5.5.1 (what our make system was built around).

                                  My guess is that there was some restructuring done around the MSVC make specs in recent Qt versions, and maybe in other MSVC-build-related areas, which is somehow related to your issue.

                                  (Just some information...)

                                  -Brian

                                  1 Reply Last reply
                                  0
                                  • webzoidW Offline
                                    webzoidW Offline
                                    webzoid
                                    wrote on last edited by webzoid
                                    #18

                                    @Brian-Dolan Thanks for your reply and thanks for the extra information. It got to the point where I uninstalled Qt AND Visual Studio then re-installed both just to see what would happen. When I re-installed Qt Creator, the same problems arose.

                                    It almost had me beat but after a little bit more digging, I've finally managed to sort it.

                                    When I executed the vcvarsall.bat file from within the Visual Studio / VC directory, I noticed that a couple of issues were being reported in the command line - notably that MySQL command not found which I thought rather odd - what would MySQL have to do with a Visual Studio install?

                                    Anyhoo, having then removed anything and everything MySQL-related from my system, running the vcvarsall.bat again yielded no reported issues. I then ran Qt Creator again using a simple example application and now everything works perfectly. All I can think of is that when the vcvarsall.bat returns an exit code, it was not the exit code expected by Qt Creator due to the MySQL issues. Either that or there was a lingering bath path around used by MySQL which no longer existed and was throwing the toolchain.

                                    Either way, I'm back in business! Thanks for all the comments and help with this.

                                    bokkiB 1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #19

                                      Well that was a tricky one...

                                      Thanks for sharing your findings !

                                      Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        deleted357
                                        wrote on last edited by
                                        #20

                                        For me, I had to install Visual C++ 2015 Build Tools for resolving the error (http://landinghub.visualstudio.com/visual-cpp-build-tools).
                                        Batch file C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat didn't found C:\Program Files (x86)\Microsoft Visual C++ Build Tools folder.

                                        Best regards.

                                        1 Reply Last reply
                                        0
                                        • webzoidW webzoid

                                          @Brian-Dolan Thanks for your reply and thanks for the extra information. It got to the point where I uninstalled Qt AND Visual Studio then re-installed both just to see what would happen. When I re-installed Qt Creator, the same problems arose.

                                          It almost had me beat but after a little bit more digging, I've finally managed to sort it.

                                          When I executed the vcvarsall.bat file from within the Visual Studio / VC directory, I noticed that a couple of issues were being reported in the command line - notably that MySQL command not found which I thought rather odd - what would MySQL have to do with a Visual Studio install?

                                          Anyhoo, having then removed anything and everything MySQL-related from my system, running the vcvarsall.bat again yielded no reported issues. I then ran Qt Creator again using a simple example application and now everything works perfectly. All I can think of is that when the vcvarsall.bat returns an exit code, it was not the exit code expected by Qt Creator due to the MySQL issues. Either that or there was a lingering bath path around used by MySQL which no longer existed and was throwing the toolchain.

                                          Either way, I'm back in business! Thanks for all the comments and help with this.

                                          bokkiB Offline
                                          bokkiB Offline
                                          bokki
                                          wrote on last edited by
                                          #21

                                          @webzoid

                                          Thanks for your post! MySQL was also the culprit on my Qt build. I also installed all MySQL software and then I could build the Qt application without problems!

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved