Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Tools for VS problem -- could not find a part of the path. Compiler issue I presume.
QtWS25 Last Chance

Qt Tools for VS problem -- could not find a part of the path. Compiler issue I presume.

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 1.0k 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
    _danae
    wrote on 19 Dec 2023, 18:37 last edited by
    #1

    Hi, New to Qt, going through the Qt Academy tutorials, not getting very far because I'm having a LOT of issues just following the steps in the videos. I'm on "Getting Started with Qt Tools for Visual Studio". You simply install the Qt Tools extension in VS and create an empty Qt Quick app -- simple enough. Installed the tools, but when it comes to choosing a Qt version there are no MSVC folders in C:\Qt\6.6.1 for me to path to. Went to Manage Kits in Qt Creator to manually add the MSVC2019 compiler with path to cl.exe as I found the suggestion in another forum post.

    Now there's an MSVC folder in C:\Qt\6.6.1 with a bin and qmake.exe inside as expected, great. Select that for my Qt Version path but it doesn't auto-populate the version name as it was supposed to. I entered the name manually, seems fine, select it as default, create new project -> Qt Quick app, give it a name, select "Create," opens the Wizard with the MSVC compiler selected for Debug and Release, select "Finish."

    This is the problem. I get an error popup that says "Exception of type 'System.Exception' was thrown." The folder and project file are created anyway, but when I attempt to open the project, I get this:

    error.png

    I am truly so lost. I already did a clean reinstall today hoping it would help, no dice. My VS install is fine and functional. I can't find anything in the forum about this. Please help me understand what is going on here. Can post any requested info.

    Bonus: If anyone can tell me why my Qt Creator didn't install correctly in the first place even when I followed the video steps I'd love to know, because it's been a neverending fount of consecutive configuration errors that seem atypical.

    C 1 Reply Last reply 19 Dec 2023, 19:50
    0
    • _ _danae
      19 Dec 2023, 18:37

      Hi, New to Qt, going through the Qt Academy tutorials, not getting very far because I'm having a LOT of issues just following the steps in the videos. I'm on "Getting Started with Qt Tools for Visual Studio". You simply install the Qt Tools extension in VS and create an empty Qt Quick app -- simple enough. Installed the tools, but when it comes to choosing a Qt version there are no MSVC folders in C:\Qt\6.6.1 for me to path to. Went to Manage Kits in Qt Creator to manually add the MSVC2019 compiler with path to cl.exe as I found the suggestion in another forum post.

      Now there's an MSVC folder in C:\Qt\6.6.1 with a bin and qmake.exe inside as expected, great. Select that for my Qt Version path but it doesn't auto-populate the version name as it was supposed to. I entered the name manually, seems fine, select it as default, create new project -> Qt Quick app, give it a name, select "Create," opens the Wizard with the MSVC compiler selected for Debug and Release, select "Finish."

      This is the problem. I get an error popup that says "Exception of type 'System.Exception' was thrown." The folder and project file are created anyway, but when I attempt to open the project, I get this:

      error.png

      I am truly so lost. I already did a clean reinstall today hoping it would help, no dice. My VS install is fine and functional. I can't find anything in the forum about this. Please help me understand what is going on here. Can post any requested info.

      Bonus: If anyone can tell me why my Qt Creator didn't install correctly in the first place even when I followed the video steps I'd love to know, because it's been a neverending fount of consecutive configuration errors that seem atypical.

      C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 19 Dec 2023, 19:50 last edited by Chris Kawa
      #2

      @_danae Looks like you've set the path to Qt to be C:\Qt\6.6.1\msvc2019_64\bin\ when it should be C:\Qt\6.6.1\msvc2019_64\ (without bin) so it looks for the mkspecs directory at the wrong level.

      In Visual Studio go to Extensions -> Qt VS Tools -> Qt Versions and add a Qt version there (if you don't have one already). The name is not important, it's just something for you to distinguish if you have multiple versions installed. Make sure the path points to the top of Qt version installation directory. It's the one that contains the bin, include, lib and other directories. Sounds like C:\Qt\6.6.1\msvc2019_64\ in your case.

      Qt Creator is another IDE that you can use as an alternative to Visual Studio. They are separate programs, so changing settings in one has nothing to do with the other. You don't need both, just the one you like more.

      _ 1 Reply Last reply 19 Dec 2023, 20:22
      1
      • C Chris Kawa
        19 Dec 2023, 19:50

        @_danae Looks like you've set the path to Qt to be C:\Qt\6.6.1\msvc2019_64\bin\ when it should be C:\Qt\6.6.1\msvc2019_64\ (without bin) so it looks for the mkspecs directory at the wrong level.

        In Visual Studio go to Extensions -> Qt VS Tools -> Qt Versions and add a Qt version there (if you don't have one already). The name is not important, it's just something for you to distinguish if you have multiple versions installed. Make sure the path points to the top of Qt version installation directory. It's the one that contains the bin, include, lib and other directories. Sounds like C:\Qt\6.6.1\msvc2019_64\ in your case.

        Qt Creator is another IDE that you can use as an alternative to Visual Studio. They are separate programs, so changing settings in one has nothing to do with the other. You don't need both, just the one you like more.

        _ Offline
        _ Offline
        _danae
        wrote on 19 Dec 2023, 20:22 last edited by
        #3

        @Chris-Kawa Thanks so much for responding. I didn't even think about looking elsewhere in the directory, I was just following the instructions in the Qt Academy tutorial and this is what it said!

        21af784d-85a5-4ab0-9cb0-140cde5e80c6-image.png

        I was trying everything I could to make things show up like they should. But I'll reach out to support about fixing the instruction, because I bet I'm not the only one who will come across this. The fix really was that simple and it solved my problem -- feels a little silly! Thanks again.

        C 1 Reply Last reply 19 Dec 2023, 20:36
        0
        • _ _danae has marked this topic as solved on 19 Dec 2023, 20:34
        • _ _danae
          19 Dec 2023, 20:22

          @Chris-Kawa Thanks so much for responding. I didn't even think about looking elsewhere in the directory, I was just following the instructions in the Qt Academy tutorial and this is what it said!

          21af784d-85a5-4ab0-9cb0-140cde5e80c6-image.png

          I was trying everything I could to make things show up like they should. But I'll reach out to support about fixing the instruction, because I bet I'm not the only one who will come across this. The fix really was that simple and it solved my problem -- feels a little silly! Thanks again.

          C Offline
          C Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on 19 Dec 2023, 20:36 last edited by
          #4

          @_danae When adding Qt version in Qt Creator you point it to the qmake.exe file (which is in the bin directory) and it figures out the top directory from that. In VS extension you have to enter the top directory manually, so it's a bit different way to achieve the same in those IDEs and maybe that's where the error in the tutorial comes from.

          1 Reply Last reply
          1

          4/4

          19 Dec 2023, 20:36

          • Login

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