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. System Cannot Find Path Specified

System Cannot Find Path Specified

Scheduled Pinned Locked Moved Unsolved General and Desktop
visual studiocmakec++compiler
25 Posts 6 Posters 10.4k 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.
  • H hskoglund
    14 Jul 2020, 04:59

    Hi, perhaps some PATH problem, try this:
    Open a normal, vanilla CMD (not a developer CMD) and type these 2 lines:

    set path=
    "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
    

    Paste the output here
    (if successful, the .bat file should complain about Powershell is missing, but also say: [vcvarsall.bat] Environment initialized for: 'x64'

    S Offline
    S Offline
    surferbrain
    wrote on 15 Jul 2020, 14:03 last edited by
    #3

    @hskoglund Thank you so much for the reply.
    I tried all variations of your request. The results are:
    313218c3-80e7-491b-a8c4-267d2b627959-image.png

    It is very interesting that CMD starts off before any command by saying "The system cannot find the path specified."

    J 1 Reply Last reply 15 Jul 2020, 14:12
    0
    • S surferbrain
      15 Jul 2020, 14:03

      @hskoglund Thank you so much for the reply.
      I tried all variations of your request. The results are:
      313218c3-80e7-491b-a8c4-267d2b627959-image.png

      It is very interesting that CMD starts off before any command by saying "The system cannot find the path specified."

      J Offline
      J Offline
      JonB
      wrote on 15 Jul 2020, 14:12 last edited by
      #4

      @surferbrain
      How do you actually run/invoke this CMD? It sounds like it's trying to run something at start-up, before it gets going? I note from running cmd /? it includes:

      /D Disable execution of AutoRun commands from registry (see below)

      so that is an example showing CMD can be running something when it starts.

      S 1 Reply Last reply 15 Jul 2020, 14:13
      0
      • J JonB
        15 Jul 2020, 14:12

        @surferbrain
        How do you actually run/invoke this CMD? It sounds like it's trying to run something at start-up, before it gets going? I note from running cmd /? it includes:

        /D Disable execution of AutoRun commands from registry (see below)

        so that is an example showing CMD can be running something when it starts.

        S Offline
        S Offline
        surferbrain
        wrote on 15 Jul 2020, 14:13 last edited by
        #5

        @JonB I pressed the Win key, typed cmd, and pressed Enter:
        1ea738aa-7150-43dd-88f6-da723d01262b-image.png

        J 1 Reply Last reply 15 Jul 2020, 14:16
        0
        • H Offline
          H Offline
          hskoglund
          wrote on 15 Jul 2020, 14:16 last edited by
          #6

          Hi, the 2nd attempt was the one I was thinking of (set path= on one line, and vcvarsall.bat on the next line)

          Now in that same CMd, (after the 2 lines that ends with .. initialzed for x64) try typing
          cl

          Does it say Microsoft Visual ... or?

          S 1 Reply Last reply 15 Jul 2020, 14:23
          0
          • S surferbrain
            15 Jul 2020, 14:13

            @JonB I pressed the Win key, typed cmd, and pressed Enter:
            1ea738aa-7150-43dd-88f6-da723d01262b-image.png

            J Offline
            J Offline
            JonB
            wrote on 15 Jul 2020, 14:16 last edited by JonB
            #7

            @surferbrain
            If you type the command

            cmd
            

            from within your Command Prompt, it will start a new one inside the current one. Output should look like:

            Microsoft Windows [Version 6.1.7601]
            Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
            
            C:\Users\Jon>cmd
            Microsoft Windows [Version 6.1.7601]
            Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
            
            C:\Users\Jon>
            

            But are you saying that after that cmd inside the Command Prompt you get your
            The system cannot find ...
            message as it starts the second shell level?

            1 Reply Last reply
            0
            • H hskoglund
              15 Jul 2020, 14:16

              Hi, the 2nd attempt was the one I was thinking of (set path= on one line, and vcvarsall.bat on the next line)

              Now in that same CMd, (after the 2 lines that ends with .. initialzed for x64) try typing
              cl

              Does it say Microsoft Visual ... or?

              S Offline
              S Offline
              surferbrain
              wrote on 15 Jul 2020, 14:23 last edited by
              #8

              @hskoglund Hi, typing cl after shows:
              82a2a341-ba50-49aa-8191-a85544780d9c-image.png
              Maybe now I should try Qt Creator and see if it still creates those cl errors.

              @JonB Yup! Even invoking cmd within cmd produces the error:
              fe67f709-32c8-48c3-a1da-a00b36411f65-image.png

              J 1 Reply Last reply 15 Jul 2020, 14:26
              0
              • S surferbrain
                15 Jul 2020, 14:23

                @hskoglund Hi, typing cl after shows:
                82a2a341-ba50-49aa-8191-a85544780d9c-image.png
                Maybe now I should try Qt Creator and see if it still creates those cl errors.

                @JonB Yup! Even invoking cmd within cmd produces the error:
                fe67f709-32c8-48c3-a1da-a00b36411f65-image.png

                J Offline
                J Offline
                JonB
                wrote on 15 Jul 2020, 14:26 last edited by
                #9

                @surferbrain
                I am only commenting on the The system cannot find .... If it were me I would want to track that down and deal with it. However, whatever it is it may be harmless or not related to your Qt situation.

                Yes, try ignoring it for now and proceeding....

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hskoglund
                  wrote on 15 Jul 2020, 14:30 last edited by
                  #10

                  You seem to have been bitten by PATH poisoning (i.e. some other program is interfering with MSVC)

                  To be able to pull the same stunt from Qt Creator you will have to launch Qt Creator from that same CMD that has the neutered path (or find a way to do it inside Qt Creator)

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    surferbrain
                    wrote on 15 Jul 2020, 15:10 last edited by surferbrain
                    #11

                    I'm wondering, I found some directories that did not exist in my system environment variables. I deleted or modified them to work. I am wondering now if the System Environment path variable in my stock kit looks correct. I would assume it is:
                    Untitled.png

                    @JonB Qt Creator still produces the same errors. It does say that perhaps:
                    92dad112-e6d9-4417-a29d-7ec98bdb3976-image.png
                    but we already knew the environment is probably screwed up in some fashion.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hskoglund
                      wrote on 15 Jul 2020, 17:49 last edited by
                      #12

                      Hmm, the PATH looks kosher, maybe it's time to clean those Visual Studios, try keep only one of them (MSVC2019) and uninstall the others (MSVC2017 etc.) Then start MSVC2019 and update it to version 16.6.4.

                      S 1 Reply Last reply 15 Jul 2020, 18:28
                      0
                      • H hskoglund
                        15 Jul 2020, 17:49

                        Hmm, the PATH looks kosher, maybe it's time to clean those Visual Studios, try keep only one of them (MSVC2019) and uninstall the others (MSVC2017 etc.) Then start MSVC2019 and update it to version 16.6.4.

                        S Offline
                        S Offline
                        surferbrain
                        wrote on 15 Jul 2020, 18:28 last edited by
                        #13

                        @hskoglund Thank you for your help.
                        I currently only have VS 2019 Community and Qt Creator 4.12.4 installed. They were installed after uninstalling all instances of VS and Qt.
                        I just updated to 16.6.4 and it still produces the same errors/warnings. Ex:
                        f7c7a3da-c354-4748-89e5-1acb73cb66ca-image.png

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          surferbrain
                          wrote on 17 Jul 2020, 14:18 last edited by
                          #14

                          Does anyone else have any possible solutions, besides reinstalling Windows?

                          J 1 Reply Last reply 17 Jul 2020, 17:55
                          0
                          • H Offline
                            H Offline
                            hskoglund
                            wrote on 17 Jul 2020, 14:46 last edited by hskoglund
                            #15

                            Hi, maybe you can use Qt Creator through my suggestion before (i.e. launch a normal (not a Developer) CMD window) and type these 3 lines:

                            set path=
                            "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
                            C:\Qt\Tools\QtCreator\bin\qtcreator.exe
                            

                            If you can compile nside Qt Creator now, you could put those 3 lines a .bat file...

                            1 Reply Last reply
                            0
                            • S surferbrain
                              17 Jul 2020, 14:18

                              Does anyone else have any possible solutions, besides reinstalling Windows?

                              J Offline
                              J Offline
                              JonB
                              wrote on 17 Jul 2020, 17:55 last edited by
                              #16

                              @surferbrain
                              You need to look inside that vcvarsall.bat file and see what paths it is trying to find/execute which cannot be found. Isn't the problem in your VS set up rather than Creator?

                              1 Reply Last reply
                              0
                              • jondoe420J Offline
                                jondoe420J Offline
                                jondoe420
                                wrote on 18 Apr 2022, 02:05 last edited by
                                #17

                                I am still having this problem in 2022. Did no one work on a fix? I thought those enterprise licenses were supposed to pay for something

                                J JKSHJ 2 Replies Last reply 18 Apr 2022, 07:01
                                1
                                • jondoe420J jondoe420
                                  18 Apr 2022, 02:05

                                  I am still having this problem in 2022. Did no one work on a fix? I thought those enterprise licenses were supposed to pay for something

                                  J Offline
                                  J Offline
                                  JonB
                                  wrote on 18 Apr 2022, 07:01 last edited by
                                  #18

                                  @jondoe420 said in System Cannot Find Path Specified:

                                  I thought those enterprise licenses were supposed to pay for something

                                  What "enterprise licenses"? Do you mean some kind of Qt commercial licence? If so why not ask TQtC?

                                  1 Reply Last reply
                                  0
                                  • jondoe420J jondoe420
                                    18 Apr 2022, 02:05

                                    I am still having this problem in 2022. Did no one work on a fix? I thought those enterprise licenses were supposed to pay for something

                                    JKSHJ Offline
                                    JKSHJ Offline
                                    JKSH
                                    Moderators
                                    wrote on 18 Apr 2022, 07:53 last edited by
                                    #19

                                    @jondoe420 said in System Cannot Find Path Specified:

                                    I am still having this problem in 2022. Did no one work on a fix? I thought those enterprise licenses were supposed to pay for something

                                    The Qt enterprise license can't fix your Visual Studio installation for you.

                                    If you'd like assistance, please provide diagnoatic information like what @surferbrain did above.

                                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                    1 Reply Last reply
                                    1
                                    • N Offline
                                      N Offline
                                      Nahian
                                      wrote on 6 May 2022, 02:11 last edited by
                                      #20

                                      so, can anyone give a step by step guide? I feel like it's taking different path even after specifying it. i=I used ifstream, fstream, ofstream, and QFile, but none worked. It's hard to believe that this issue is not being fixed. I am using QT creator.

                                      J 1 Reply Last reply 6 May 2022, 07:06
                                      0
                                      • N Nahian
                                        6 May 2022, 02:11

                                        so, can anyone give a step by step guide? I feel like it's taking different path even after specifying it. i=I used ifstream, fstream, ofstream, and QFile, but none worked. It's hard to believe that this issue is not being fixed. I am using QT creator.

                                        J Offline
                                        J Offline
                                        JonB
                                        wrote on 6 May 2022, 07:06 last edited by
                                        #21

                                        @Nahian
                                        Hello and welcome.

                                        " step by step guide" to what? This thread is a question about the MS-supplied vcvars...bat file having an error in it when run on the user's system, likely nothing to do with Qt.

                                        I used ifstream, fstream, ofstream, and QFile, but none worked.

                                        Used them for what? I don't see any connection between these calls and vcvars.bat issuing an error message.

                                        1 Reply Last reply
                                        0
                                        • N Offline
                                          N Offline
                                          Nahian
                                          wrote on 14 May 2022, 06:29 last edited by
                                          #22

                                          @JonB sorry for the late reply, my problem seems different, but the error message is similar to mine.

                                          So my problem is: I am using a basic c++ technique just create a text file, but it's always telling me that file not found or cant open. It worked when I downloaded the qt creator for the first time, but now it doesn't work. The common error message was "System Cannot Find Path Specified" I am going to upload a video about the problem and send the link here so you can see everything.

                                          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