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. "'cl' is not recognized as an internal or external command" error after VS2019 update?
QtWS25 Last Chance

"'cl' is not recognized as an internal or external command" error after VS2019 update?

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 3 Posters 2.9k 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.
  • M Offline
    M Offline
    Mucip
    wrote on 10 Dec 2020, 20:43 last edited by
    #1

    Hi,
    I use Qt 5.14.2 MSVC2017. I have also VS2019 Community.
    I got "update warning" from VS Updater unfortunatelly I confirmed... :(

    After than update apply I rearrange kits in Qt Options.
    And now I can not run project in Qt. Below message appear.

    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    jom: D:\Belgeler\Qt\build-MegYonetim-Desktop_Qt_5_14_2_MSVC2017_64bit-Release\Makefile.Release [release\delegatemiktar.obj] Error 1
    jom: D:\Belgeler\Qt\build-MegYonetim-Desktop_Qt_5_14_2_MSVC2017_64bit-Release\Makefile [release] Error 2
    23:38:48: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project MegYonetim (kit: Desktop Qt 5.14.2 MSVC2017 64bit)
    When executing step "Make"
    

    Regards,
    Mucip:)

    J 1 Reply Last reply 11 Dec 2020, 05:31
    0
    • B Offline
      B Offline
      Bonnie
      wrote on 11 Dec 2020, 07:27 last edited by
      #14

      I think it is because after the update, the full path of cl.exe has changed.
      Normally Qt uses vcvarsall.bat to set the enviroment, so there won't be any problem.
      But when you set the Path of the project, it saved in the pro.user with the old Path.

      M 1 Reply Last reply 11 Dec 2020, 07:30
      1
      • M Mucip
        10 Dec 2020, 20:43

        Hi,
        I use Qt 5.14.2 MSVC2017. I have also VS2019 Community.
        I got "update warning" from VS Updater unfortunatelly I confirmed... :(

        After than update apply I rearrange kits in Qt Options.
        And now I can not run project in Qt. Below message appear.

        'cl' is not recognized as an internal or external command,
        operable program or batch file.
        jom: D:\Belgeler\Qt\build-MegYonetim-Desktop_Qt_5_14_2_MSVC2017_64bit-Release\Makefile.Release [release\delegatemiktar.obj] Error 1
        jom: D:\Belgeler\Qt\build-MegYonetim-Desktop_Qt_5_14_2_MSVC2017_64bit-Release\Makefile [release] Error 2
        23:38:48: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
        Error while building/deploying project MegYonetim (kit: Desktop Qt 5.14.2 MSVC2017 64bit)
        When executing step "Make"
        

        Regards,
        Mucip:)

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 11 Dec 2020, 05:31 last edited by
        #2

        @Mucip said in "'cl' is not recognized as an internal or external command" error after VS2019 update?:

        After than update apply I rearrange kits in Qt Options

        Why and in what way?
        Do you now have any warnings/errors in your Kits?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply 11 Dec 2020, 06:16
        0
        • J jsulm
          11 Dec 2020, 05:31

          @Mucip said in "'cl' is not recognized as an internal or external command" error after VS2019 update?:

          After than update apply I rearrange kits in Qt Options

          Why and in what way?
          Do you now have any warnings/errors in your Kits?

          M Offline
          M Offline
          Mucip
          wrote on 11 Dec 2020, 06:16 last edited by
          #3

          @jsulm ,
          I just started Qt Cereator with hope but I got below "General Message"

          2020-12-11T09:12:57 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
          Error while parsing file D:\Belgeler\Qt\MegYonetim\MegYonetim.pro. Giving up.
          Project ERROR: Cannot run compiler 'cl'. Output:
          ===================
          ===================
          Maybe you forgot to setup the environment?
          

          And my Kits screen is like this. I've got more than one android kit and I don't know why?

          507aa450-f5f8-473c-874b-5f3b8c663c5d-resim.png

          Regards,
          Mucip:)

          J 1 Reply Last reply 11 Dec 2020, 06:19
          0
          • M Mucip
            11 Dec 2020, 06:16

            @jsulm ,
            I just started Qt Cereator with hope but I got below "General Message"

            2020-12-11T09:12:57 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
            Error while parsing file D:\Belgeler\Qt\MegYonetim\MegYonetim.pro. Giving up.
            Project ERROR: Cannot run compiler 'cl'. Output:
            ===================
            ===================
            Maybe you forgot to setup the environment?
            

            And my Kits screen is like this. I've got more than one android kit and I don't know why?

            507aa450-f5f8-473c-874b-5f3b8c663c5d-resim.png

            Regards,
            Mucip:)

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 11 Dec 2020, 06:19 last edited by
            #4

            @Mucip Did you try a complete/clean rebuild: delete build folder, run qmake, build?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply 11 Dec 2020, 06:23
            0
            • J jsulm
              11 Dec 2020, 06:19

              @Mucip Did you try a complete/clean rebuild: delete build folder, run qmake, build?

              M Offline
              M Offline
              Mucip
              wrote on 11 Dec 2020, 06:23 last edited by
              #5

              @jsulm ,
              Yes.
              I deleted compiled folder. Run qmake and build again. Unfortunatelly same error.

              Error while parsing file D:\Belgeler\Qt\MegYonetim\MegYonetim.pro. Giving up.
              Project ERROR: Cannot run compiler 'cl'. Output:
              ===================
              ===================
              Maybe you forgot to setup the environment?
              

              Regards,
              Mucip:)

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Bonnie
                wrote on 11 Dec 2020, 06:26 last edited by
                #6

                Go to "Compilers" and click Re-detect, then Apply.

                M 1 Reply Last reply 11 Dec 2020, 06:29
                0
                • B Bonnie
                  11 Dec 2020, 06:26

                  Go to "Compilers" and click Re-detect, then Apply.

                  M Offline
                  M Offline
                  Mucip
                  wrote on 11 Dec 2020, 06:29 last edited by
                  #7

                  @Bonnie ,
                  I did it many times. :(
                  Same problem.

                  Regards,
                  Mucip:)

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Bonnie
                    wrote on 11 Dec 2020, 06:41 last edited by
                    #8

                    If you start command prompt from "x64 Native Tools Command Prompt for VS 2019" in the start menu, can you run cl?

                    M 1 Reply Last reply 11 Dec 2020, 06:43
                    0
                    • B Bonnie
                      11 Dec 2020, 06:41

                      If you start command prompt from "x64 Native Tools Command Prompt for VS 2019" in the start menu, can you run cl?

                      M Offline
                      M Offline
                      Mucip
                      wrote on 11 Dec 2020, 06:43 last edited by
                      #9

                      @Bonnie
                      Looks lik OK.

                      6092bdab-08df-497d-8747-487fd7b98ce7-resim.png

                      Regards,
                      Mucip:)

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        Bonnie
                        wrote on 11 Dec 2020, 06:55 last edited by
                        #10

                        Hmm...I'm out of ideas, had you change the Path in your project's Build Environment?

                        M 2 Replies Last reply 11 Dec 2020, 06:59
                        0
                        • B Bonnie
                          11 Dec 2020, 06:55

                          Hmm...I'm out of ideas, had you change the Path in your project's Build Environment?

                          M Offline
                          M Offline
                          Mucip
                          wrote on 11 Dec 2020, 06:59 last edited by
                          #11

                          @Bonnie ,
                          Yes, I added PostgreSQL driver paths only.

                          But everythig wa OK before then VS2019 update.:(

                          Regards,
                          Mucip:)

                          B 1 Reply Last reply 11 Dec 2020, 07:05
                          0
                          • M Mucip
                            11 Dec 2020, 06:59

                            @Bonnie ,
                            Yes, I added PostgreSQL driver paths only.

                            But everythig wa OK before then VS2019 update.:(

                            Regards,
                            Mucip:)

                            B Offline
                            B Offline
                            Bonnie
                            wrote on 11 Dec 2020, 07:05 last edited by Bonnie 12 Nov 2020, 07:11
                            #12

                            @Mucip Then try to reset the Path first, and add your driver paths back after that.

                            1 Reply Last reply
                            0
                            • B Bonnie
                              11 Dec 2020, 06:55

                              Hmm...I'm out of ideas, had you change the Path in your project's Build Environment?

                              M Offline
                              M Offline
                              Mucip
                              wrote on 11 Dec 2020, 07:18 last edited by
                              #13

                              @Bonnie
                              I think I found a solution with your helps.

                              I deleted pro.user file in the project directory and recreated with Qt Creator.
                              I added PostgreSQL ODBC paths in Build Environment path.

                              Than all is fine now.

                              But I don't know why it is happened like this?!

                              Thank you all guys. :)

                              Regards,
                              Mucip:)

                              1 Reply Last reply
                              1
                              • B Offline
                                B Offline
                                Bonnie
                                wrote on 11 Dec 2020, 07:27 last edited by
                                #14

                                I think it is because after the update, the full path of cl.exe has changed.
                                Normally Qt uses vcvarsall.bat to set the enviroment, so there won't be any problem.
                                But when you set the Path of the project, it saved in the pro.user with the old Path.

                                M 1 Reply Last reply 11 Dec 2020, 07:30
                                1
                                • B Bonnie
                                  11 Dec 2020, 07:27

                                  I think it is because after the update, the full path of cl.exe has changed.
                                  Normally Qt uses vcvarsall.bat to set the enviroment, so there won't be any problem.
                                  But when you set the Path of the project, it saved in the pro.user with the old Path.

                                  M Offline
                                  M Offline
                                  Mucip
                                  wrote on 11 Dec 2020, 07:30 last edited by
                                  #15

                                  @Bonnie
                                  You may be right.
                                  But I use like this more than 1 year and I made many VS2019 update in this period.
                                  This was the first time. Interesting?!...

                                  Regards,
                                  Mucip:)

                                  1 Reply Last reply
                                  0

                                  1/15

                                  10 Dec 2020, 20:43

                                  • Login

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