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. Qt Creator and Visual C++ Compilers

Qt Creator and Visual C++ Compilers

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 2.2k 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.
  • N Offline
    N Offline
    Nima Ghorab
    wrote on last edited by Nima Ghorab
    #1

    Hello guys.
    If I install Microsoft Build Tools in other drivers than C drive the problem is Qt Creator can't detect compilers of Microsoft Build Tools in Auto Detected section!
    If I install it in C drive, there is no problem and compilers will be detected by Qt Creator successfully!
    for better understanding, I tried to create and address compilers manually but at the end of the road I encounter errors!
    Here is what I did in manual way:
    First, I create two compilers using Add -> Custom -> one for C and one for C++
    Second, I address cl.exe and nmake.exe for proper Visual C++ Compiler like the image below:
    0_1548192268147_Visual C++ Compiler.PNG
    Third, I create a kit and set options like the image below:
    0_1548192387339_Settings.PNG
    But after I create simple Qt Console Project and try to build it these errors show:
    0_1548192519035_Errors.PNG
    So my questions are:
    1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?
    2_How can I set Visual C++ Compiler manually if I want (above images) ?
    Thank you so much!

    JKSHJ aha_1980A 2 Replies Last reply
    0
    • N Nima Ghorab

      Hello guys.
      If I install Microsoft Build Tools in other drivers than C drive the problem is Qt Creator can't detect compilers of Microsoft Build Tools in Auto Detected section!
      If I install it in C drive, there is no problem and compilers will be detected by Qt Creator successfully!
      for better understanding, I tried to create and address compilers manually but at the end of the road I encounter errors!
      Here is what I did in manual way:
      First, I create two compilers using Add -> Custom -> one for C and one for C++
      Second, I address cl.exe and nmake.exe for proper Visual C++ Compiler like the image below:
      0_1548192268147_Visual C++ Compiler.PNG
      Third, I create a kit and set options like the image below:
      0_1548192387339_Settings.PNG
      But after I create simple Qt Console Project and try to build it these errors show:
      0_1548192519035_Errors.PNG
      So my questions are:
      1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?
      2_How can I set Visual C++ Compiler manually if I want (above images) ?
      Thank you so much!

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

      @Nima-Ghorab said in Qt Creator and Visual C++ Compilers:

      1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?

      The way you added the Compiler and Kit looks correct.

      But after I create simple Qt Console Project and try to build it these errors show

      Did you tell your project to use your new Kit?

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

      N 1 Reply Last reply
      1
      • N Nima Ghorab

        Hello guys.
        If I install Microsoft Build Tools in other drivers than C drive the problem is Qt Creator can't detect compilers of Microsoft Build Tools in Auto Detected section!
        If I install it in C drive, there is no problem and compilers will be detected by Qt Creator successfully!
        for better understanding, I tried to create and address compilers manually but at the end of the road I encounter errors!
        Here is what I did in manual way:
        First, I create two compilers using Add -> Custom -> one for C and one for C++
        Second, I address cl.exe and nmake.exe for proper Visual C++ Compiler like the image below:
        0_1548192268147_Visual C++ Compiler.PNG
        Third, I create a kit and set options like the image below:
        0_1548192387339_Settings.PNG
        But after I create simple Qt Console Project and try to build it these errors show:
        0_1548192519035_Errors.PNG
        So my questions are:
        1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?
        2_How can I set Visual C++ Compiler manually if I want (above images) ?
        Thank you so much!

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

        @Nima-Ghorab You cannot set up MSVC compilers manually.

        Qt has to stay free or it will die.

        JKSHJ 1 Reply Last reply
        3
        • JKSHJ JKSH

          @Nima-Ghorab said in Qt Creator and Visual C++ Compilers:

          1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?

          The way you added the Compiler and Kit looks correct.

          But after I create simple Qt Console Project and try to build it these errors show

          Did you tell your project to use your new Kit?

          N Offline
          N Offline
          Nima Ghorab
          wrote on last edited by
          #4

          @JKSH said in Qt Creator and Visual C++ Compilers:

          Did you tell your project to use your new Kit?

          Yes but I get those errors in the last image above!

          @aha_1980 said in Qt Creator and Visual C++ Compilers:

          @Nima-Ghorab You cannot set up MSVC compilers manually.

          Why we can't do this manually?
          Is this mean that we have to install MSVC in C drive?

          Thank you so much guys.

          aha_1980A 1 Reply Last reply
          0
          • aha_1980A aha_1980

            @Nima-Ghorab You cannot set up MSVC compilers manually.

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

            @aha_1980 said in Qt Creator and Visual C++ Compilers:

            You cannot set up MSVC compilers manually.

            TIL

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

            1 Reply Last reply
            0
            • N Nima Ghorab

              @JKSH said in Qt Creator and Visual C++ Compilers:

              Did you tell your project to use your new Kit?

              Yes but I get those errors in the last image above!

              @aha_1980 said in Qt Creator and Visual C++ Compilers:

              @Nima-Ghorab You cannot set up MSVC compilers manually.

              Why we can't do this manually?
              Is this mean that we have to install MSVC in C drive?

              Thank you so much guys.

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

              @Nima-Ghorab said in Qt Creator and Visual C++ Compilers:

              Why we can't do this manually?

              Because environment variables needs to be proper set up for the compiler to work, and registry entries need to be correct.

              Is this mean that we have to install MSVC in C drive?

              At least that is the most easy solution. I always installed it at the default location.

              Qt has to stay free or it will die.

              N 1 Reply Last reply
              3
              • aha_1980A aha_1980

                @Nima-Ghorab said in Qt Creator and Visual C++ Compilers:

                Why we can't do this manually?

                Because environment variables needs to be proper set up for the compiler to work, and registry entries need to be correct.

                Is this mean that we have to install MSVC in C drive?

                At least that is the most easy solution. I always installed it at the default location.

                N Offline
                N Offline
                Nima Ghorab
                wrote on last edited by Nima Ghorab
                #7

                @aha_1980
                Really thanks man now I am happy with it.

                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