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. Github workflow - Cannot run compiler 'cl'

Github workflow - Cannot run compiler 'cl'

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 3 Posters 760 Views
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello. I'm setting up a qt project with a github workflow. I'm using jurplel/install-qt-action@v2 to configure qt. Sadly, running qmake results in the following error (on windows-latest):

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

    I already figured out that it's because cl is not added to the PATH. Is there an easy way to do that? microsoft/setup-msbuild@v1.1 doesn't work because it only adds msbuild.exe to the PATH.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You need to setup environment so the msvc compiler and linker can be found. Normally this is done by running vcvars64.bat (or vcvars32.bat for 32 bit builds) script provided by Visual Studio installation.
      I've never used github actions, but this seems to do just that: Visual Studio shell

      ? 1 Reply Last reply
      1
      • cristian-adamC Offline
        cristian-adamC Offline
        cristian-adam
        wrote on last edited by
        #3

        Qt Creator is being built on GitHub Actions, see https://github.com/qt-creator/qt-creator/blob/master/.github/workflows/build_cmake.yml

        It might be a bit verbose, but it does its job.

        1 Reply Last reply
        1
        • Chris KawaC Chris Kawa

          You need to setup environment so the msvc compiler and linker can be found. Normally this is done by running vcvars64.bat (or vcvars32.bat for 32 bit builds) script provided by Visual Studio installation.
          I've never used github actions, but this seems to do just that: Visual Studio shell

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @Chris-Kawa
          thank you. That works

          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