Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Tools
    4
    11
    6846
    Loading More Posts
    • 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.
    • Stokestack
      Stokestack last edited by

      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.

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @Stokestack last edited by

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

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

        1 Reply Last reply Reply Quote 3
        • Stokestack
          Stokestack last edited by 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

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @Stokestack last edited by

            @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

            Stokestack 1 Reply Last reply Reply Quote 0
            • Stokestack
              Stokestack @jsulm last edited by

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

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @Stokestack last edited by

                @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

                Stokestack 1 Reply Last reply Reply Quote 0
                • Stokestack
                  Stokestack @jsulm last edited by 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.

                  jsulm 1 Reply Last reply Reply Quote 0
                  • jsulm
                    jsulm Lifetime Qt Champion @Stokestack last edited by 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++).

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

                    Stokestack 1 Reply Last reply Reply Quote 0
                    • Stokestack
                      Stokestack @jsulm last edited by

                      @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 Reply Quote 1
                      • O
                        ozzaman last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • D
                          D.Maya last edited by

                          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 Reply Quote 0
                          • First post
                            Last post