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. How do we fix "C and C++ compiler paths differ. C compiler may not work."

How do we fix "C and C++ compiler paths differ. C compiler may not work."

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 4 Posters 8.3k 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.
  • StokestackS Offline
    StokestackS Offline
    Stokestack
    wrote on last edited by
    #1

    This started after I installed Android Studio, which is a bit worrisome.

    I can't find any place to specify these paths in QtCreator. I viewed the list of compilers and the same one (GCC) is at the top for both C++ and C (under Preferences/Kits/Compilers).

    How do we resolve this?

    Thanks.

    jsulmJ 1 Reply Last reply
    0
    • StokestackS Stokestack

      This started after I installed Android Studio, which is a bit worrisome.

      I can't find any place to specify these paths in QtCreator. I viewed the list of compilers and the same one (GCC) is at the top for both C++ and C (under Preferences/Kits/Compilers).

      How do we resolve this?

      Thanks.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Stokestack Go to "Tools/Options.../Kits/Compilers"

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

      1 Reply Last reply
      3
      • StokestackS Offline
        StokestackS Offline
        Stokestack
        wrote on last edited by Stokestack
        #3

        Thanks for your reply. I did visit that page, but it doesn't seem to provide any explanation. However... that complaint has magically disappeared. Just in case this provides any insight, I'll post a screen shot of the compilers list:

        0_1548972001945_compilers.png

        jsulmJ 1 Reply Last reply
        0
        • StokestackS Stokestack

          Thanks for your reply. I did visit that page, but it doesn't seem to provide any explanation. However... that complaint has magically disappeared. Just in case this provides any insight, I'll post a screen shot of the compilers list:

          0_1548972001945_compilers.png

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

          @Stokestack To see how a compiler is configured you have to select it in that list first

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

          StokestackS 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Stokestack To see how a compiler is configured you have to select it in that list first

            StokestackS Offline
            StokestackS Offline
            Stokestack
            wrote on last edited by
            #5

            @jsulm Thanks. I clicked on a few, but I don't see how this explains which compiler is specified for each language, or why Qt thought a different one was being specified for C than for C++.

            It may have been a Qt bug, since the warning message eventually disappeared and I haven't done anything to the configuration. I was just curious as to how one sees which compiler is specified for each language.

            jsulmJ 1 Reply Last reply
            0
            • StokestackS Stokestack

              @jsulm Thanks. I clicked on a few, but I don't see how this explains which compiler is specified for each language, or why Qt thought a different one was being specified for C than for C++.

              It may have been a Qt bug, since the warning message eventually disappeared and I haven't done anything to the configuration. I was just curious as to how one sees which compiler is specified for each language.

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Stokestack There are two sections: one for C and one for C++.
              If you again have this issue compare what you see in C and in C++ sections.
              It's for sure not a Qt (framework) bug, but QtCreator (IDE) one (maybe, could be just a configuration issue).

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

              StokestackS 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Stokestack There are two sections: one for C and one for C++.
                If you again have this issue compare what you see in C and in C++ sections.
                It's for sure not a Qt (framework) bug, but QtCreator (IDE) one (maybe, could be just a configuration issue).

                StokestackS Offline
                StokestackS Offline
                Stokestack
                wrote on last edited by Stokestack
                #7

                @jsulm Thanks. How does this list answer the question, though? How do I know which compiler is used for C and which is used for C++? It appears to be just a big list of available compilers. If the problem happens again, I don't see how this list helps me.

                jsulmJ 1 Reply Last reply
                0
                • StokestackS Stokestack

                  @jsulm Thanks. How does this list answer the question, though? How do I know which compiler is used for C and which is used for C++? It appears to be just a big list of available compilers. If the problem happens again, I don't see how this list helps me.

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by jsulm
                  #8

                  @Stokestack Which compiler you're currently using is defined in the Kit you're currently using. So check the Kit to see which compiler is used, then got to the Compilers tab and see how it is configured (there are two sections: one for C and one for C++).

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

                  StokestackS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Stokestack Which compiler you're currently using is defined in the Kit you're currently using. So check the Kit to see which compiler is used, then got to the Compilers tab and see how it is configured (there are two sections: one for C and one for C++).

                    StokestackS Offline
                    StokestackS Offline
                    Stokestack
                    wrote on last edited by
                    #9

                    @jsulm Actually, it turns out that all the necessary information is hidden on the Kits page.

                    The problem is that there's no indication (on either of these pages) that you are supposed to click on the list entries. If the detail pane were displayed at all times, it would be clear. But if a nice person likes you takes the time to point out this Easter egg, you get the info:

                    0_1549003535021_compilers.png

                    The odd part is that A. The warning disappeared, and B. Two different compilers were chosen by default.

                    1 Reply Last reply
                    1
                    • O Offline
                      O Offline
                      ozzaman
                      wrote on last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        D.Maya
                        wrote on last edited by
                        #11

                        Hello, i started to have the same warning after i had updated MSVC 2019 Compilers.
                        I corrected this issue by re-detecting compilers list.
                        Go to "Tools/Options/Kits"

                        2021-04-23.png

                        then you can remove the "Emscripten Compiler" which is the one causing this warning.

                        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