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.
  • S Offline
    S Offline
    Stokestack
    wrote on 29 Jan 2019, 02:05 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.

    J 1 Reply Last reply 29 Jan 2019, 06:08
    0
    • S Stokestack
      29 Jan 2019, 02:05

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 29 Jan 2019, 06:08 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
      • S Offline
        S Offline
        Stokestack
        wrote on 31 Jan 2019, 22:00 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

        J 1 Reply Last reply 1 Feb 2019, 05:52
        0
        • S Stokestack
          31 Jan 2019, 22:00

          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

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 1 Feb 2019, 05:52 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

          S 1 Reply Last reply 1 Feb 2019, 06:28
          0
          • J jsulm
            1 Feb 2019, 05:52

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

            S Offline
            S Offline
            Stokestack
            wrote on 1 Feb 2019, 06:28 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.

            J 1 Reply Last reply 1 Feb 2019, 06:31
            0
            • S Stokestack
              1 Feb 2019, 06:28

              @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.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 1 Feb 2019, 06:31 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

              S 1 Reply Last reply 1 Feb 2019, 06:34
              0
              • J jsulm
                1 Feb 2019, 06:31

                @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).

                S Offline
                S Offline
                Stokestack
                wrote on 1 Feb 2019, 06:34 last edited by Stokestack 2 Jan 2019, 06:35
                #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.

                J 1 Reply Last reply 1 Feb 2019, 06:37
                0
                • S Stokestack
                  1 Feb 2019, 06:34

                  @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.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 1 Feb 2019, 06:37 last edited by jsulm 2 Jan 2019, 06:38
                  #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

                  S 1 Reply Last reply 1 Feb 2019, 06:46
                  0
                  • J jsulm
                    1 Feb 2019, 06:37

                    @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++).

                    S Offline
                    S Offline
                    Stokestack
                    wrote on 1 Feb 2019, 06:46 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 24 Apr 2021, 10:33 last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        D.Maya
                        wrote on 24 Apr 2021, 10:40 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