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. :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.
Forum Updated to NodeBB v4.3 + New Features

:-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 4 Posters 2.6k 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.
  • L L. Spiro

    I already have Visual Studio 2015 etc.
    Where do I go to change this path so that it finds the correct version?

    L. Spiro

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @l-spiro If you're using QtCreator then go to "Tools/Options/Kits" and check the Kits you have there. Do you have one with Visual Studio 2015 C++ compiler there? In the bottom left side in QtCreator you can select the Kit you want to use, make sure Visual Studio 2015 Kit is selected.
    Which exact Qt 5.13 version did you install (for which compiler)?

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

    1 Reply Last reply
    0
    • L Offline
      L Offline
      L. Spiro
      wrote on last edited by
      #5

      It shows “Desktop Qt 5.13.0 MSVS2015 64bit (default)” there.
      This aligns with the version I downloaded and installed, and I see nothing wrong with the paths there.
      The C++ compiler set there is “Microsoft Visual C++ Compiler 14.0 (amd” (this is all I can read because the combo box is too small).

      L. Spiro

      aha_1980A 1 Reply Last reply
      0
      • L L. Spiro

        It shows “Desktop Qt 5.13.0 MSVS2015 64bit (default)” there.
        This aligns with the version I downloaded and installed, and I see nothing wrong with the paths there.
        The C++ compiler set there is “Microsoft Visual C++ Compiler 14.0 (amd” (this is all I can read because the combo box is too small).

        L. Spiro

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @l-spiro From my experience, the MSVC compiler detection only works correctly if MSVC is installed in the default location. Is there a reason you installed it on drive E: ?

        Qt has to stay free or it will die.

        L 1 Reply Last reply
        0
        • aha_1980A aha_1980

          @l-spiro From my experience, the MSVC compiler detection only works correctly if MSVC is installed in the default location. Is there a reason you installed it on drive E: ?

          L Offline
          L Offline
          L. Spiro
          wrote on last edited by
          #7

          @aha_1980 Hard drive space.

          L. Spiro

          aha_1980A JKSHJ 2 Replies Last reply
          1
          • L L. Spiro

            @aha_1980 Hard drive space.

            L. Spiro

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #8

            @l-spiro Ok, I understand.

            Nevertheless, when using non-standard layouts, you're on your own when things go wrong.

            But where did it get this path? The path itself is entirely valid. The BAT file is at that location and nothing is misspelled. It seems only to be an issue with the fact that there are spaces in the path.

            The path is taken from the registry, IIRC.

            L. Spiro about 4 hours ago

            :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86":
            \Microsoft was unexpected at this time.

            When resp. where does this message appear exactly?

            What you can also try is to use Creator 4.10: https://blog.qt.io/blog/2019/08/02/qt-creator-4-10-rc-released

            I think this version allows you to select arbitrary vcvars.bat, but I'm not sure.

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            1
            • L Offline
              L Offline
              L. Spiro
              wrote on last edited by
              #9

              0_1565076312974_169d98df-5dfe-4843-b48e-509900a2b0ab-image.png
              It appears there.

              I intend to code in Visual Studio and use Creator sparingly, and this is just a sample. Do I need to worry about this error?

              L. Spiro

              aha_1980A 1 Reply Last reply
              0
              • L L. Spiro

                0_1565076312974_169d98df-5dfe-4843-b48e-509900a2b0ab-image.png
                It appears there.

                I intend to code in Visual Studio and use Creator sparingly, and this is just a sample. Do I need to worry about this error?

                L. Spiro

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #10

                @l-spiro said in :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.:

                I intend to code in Visual Studio and use Creator sparingly, and this is just a sample. Do I need to worry about this error?

                Well, it means you cannot use this compiler. Does the MSVC 2015 compiler work in Creator? Can you show Tools > Options > Kits > Compilers?

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  L. Spiro
                  wrote on last edited by
                  #11

                  0_1565077131564_52997015-f9a4-4058-a590-f8a23446555e-image.png
                  All installations of Visual Studio are on E:\ and should be expected to have this same issue.

                  L. Spiro

                  jsulmJ 1 Reply Last reply
                  0
                  • L L. Spiro

                    0_1565077131564_52997015-f9a4-4058-a590-f8a23446555e-image.png
                    All installations of Visual Studio are on E:\ and should be expected to have this same issue.

                    L. Spiro

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    @l-spiro Can you show the kit you're using? Did you really configure 2015 compiler there?

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

                    1 Reply Last reply
                    0
                    • L L. Spiro

                      @aha_1980 Hard drive space.

                      L. Spiro

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #13

                      @l-spiro said in :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.:

                      Hard drive space.

                      As a workaround, try to use mklink to create a Directory Symbolic Link or a Directory Junction. Make C:\Program Files (x86)\Microsoft Visual Studio 9.0\ point to E:\Programs\Microsoft Visual Studio 9.0\ (assuming you have 64-bit Windows). This will make your system think that Visual Studio is available in the C: drive.

                      https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink

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

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        L. Spiro
                        wrote on last edited by
                        #14

                        0_1565078356752_fa71d30a-7b3c-4e75-a02b-862981d30536-image.png
                        This was all configured automatically. And since the 2015 Visual Studio version is what I selected, it seems this is all correct.

                        I can try the symbolic link later today after sleeping.

                        L. Spiro

                        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