Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to compile with MSVC 2019 - Cannot run cl.exe, but vcvarsall.bat looks all correct
Forum Updated to NodeBB v4.3 + New Features

Unable to compile with MSVC 2019 - Cannot run cl.exe, but vcvarsall.bat looks all correct

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 711 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.
  • enjoysmathE Offline
    enjoysmathE Offline
    enjoysmath
    wrote on last edited by
    #1

    I get "C++ and C compiler paths differ" warning at startup of QtCreator:
    a1165676-65e3-456c-8259-4b1745b6f8cc-image.png

    And this:
    ec8f37b5-835f-4519-8592-811aa802bcad-image.png

    Upon building. I've made sure MSVC 14 - 19 are installed using the VS installer tool. And I've also located vcvarsall / vcvars64 / vcvars32.bat, and they run correctly. And once run manually from the command line, I can call "cl.exe" from the command line.

    I tried adding this to my Path env var:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.29.30031\bin\Hostx86\x86;

    the location of cl.exe and that just causes include errors etc. So it appears, even though Qt knows where to find vcvarsall.bat:

    4324b9c4-e58d-4e6e-bd3c-e03f02f6d12b-image.png

    something still is not set right. Any ideas of how to fix this issue? Other similar posts with answers don't resolve it for me.

    So something tells me the first Qt Creator startup warnings are saying something important. How do I make sure the C++ / C compiler paths are the same?

    https://github.com/enjoysmath
    https://math.stackexchange.com/users/26327/exercisingmathematician

    1 Reply Last reply
    0
    • enjoysmathE Offline
      enjoysmathE Offline
      enjoysmath
      wrote on last edited by
      #2

      Re: [Unable to compile with MSVC 2019 - Cannot run cl.exe](but vcvarsall.bat looks all correct)

      I built SymbolicC++ as a static library but found out its much easier just to INCLUDEPATH a subdirectory made up of all the header files.

      So I was able to switch back to MinGW kit, which "solves" this for me.

      https://github.com/enjoysmath
      https://math.stackexchange.com/users/26327/exercisingmathematician

      1 Reply Last reply
      1

      • Login

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