Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Project ERROR: Cannot run compiler 'clang++'. Output

Project ERROR: Cannot run compiler 'clang++'. Output

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
15 Posts 9 Posters 32.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.
  • J Offline
    J Offline
    jarelsanders1986
    wrote on last edited by
    #1

    I get the following error and Im unsure how to resolve the issue.

    Project ERROR: Cannot run compiler 'clang++'. Output:

    ===================
    Maybe you forgot to setup the environment?
    23:34:44: The process "/home/jarel/Qt/5.12.1/gcc_64/bin/qmake" exited with code 3.
    Error while building/deploying project untitled (kit: Desktop Qt 5.12.1 GCC 64bit)
    When executing step "qmake"

    D 1 Reply Last reply
    2
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What OS are you running ?
      What compilers did you install ?
      How did you configure Qt to use clang in place of gcc ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jarelsanders1986
        wrote on last edited by
        #3

        Hello

        Im running OpenSUSE Leap 15
        0_1549230819155_qt.png

        for the last question, I hope ill answer it the correct way. Im not sure how I configured it. I just installed Qt creator and when I tried to create a new project, I seen the error message

        jsulmJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          Then you should check your Kit.

          How did you install Qt ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • J jarelsanders1986

            Hello

            Im running OpenSUSE Leap 15
            0_1549230819155_qt.png

            for the last question, I hope ill answer it the correct way. Im not sure how I configured it. I just installed Qt creator and when I tried to create a new project, I seen the error message

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

            @jarelsanders1986 Is there a reason why you're using RC1 of the QtCreator?
            Do you need Clang? If not you can use GCC which is default on Linux.

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

            1 Reply Last reply
            1
            • C Offline
              C Offline
              Castro88
              wrote on last edited by
              #6

              I had exactly the same issue on Ubuntu "18.04.2 LTS". I solved the problem by installing clang:

              ~$ sudo apt install clang

              G D 2 Replies Last reply
              2
              • C Castro88

                I had exactly the same issue on Ubuntu "18.04.2 LTS". I solved the problem by installing clang:

                ~$ sudo apt install clang

                G Offline
                G Offline
                greensh
                wrote on last edited by
                #7

                @Castro88

                I had the exact the same project parsing error on Qt 5.12.3 and Kubuntu 18.04.2 LTS and solved it an easier way (since in the OP's case, he wouldn't need sudo rights for the symlink):

                $ cd /home/jarel/Qt/5.12.1/Tools/QtCreator/libexec/qtcreator/clang/bin
                $ ln -sf clang-7 clang++

                1 Reply Last reply
                1
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @greensh Hi and welcome to devnet,

                  That's not a solution. Install the clang package but don't mix the tools used by creator with the one provided by your distribution.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  G 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    @greensh Hi and welcome to devnet,

                    That's not a solution. Install the clang package but don't mix the tools used by creator with the one provided by your distribution.

                    G Offline
                    G Offline
                    greensh
                    wrote on last edited by greensh
                    #9

                    @SGaist

                    From reading about the latest clang changes in QtCreator, see comments section at:
                    https://blog.qt.io/blog/2019/04/15/qt-creator-4-9-0-released/

                    it's presumed the preferred Qt method is to use their integrated Clang version with QtCreator, rather than using a mismatched system version with QtCreator's Clang plugins. It's also presumed that QtCreator 4.9.0 should compile C++ code out-of-the-box on Ubuntu with only the system build-essential installed (which only includes the GCC toolchain).

                    Can you provide any Qt documentation to support this not being a solution or the Qt preferred way?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Qt Creator is an IDE, it doesn't provide compiler support. Providing compilers is the role of your OS.

                      The fact that the clang executable can be found in Qt Creator is an implementation detail because Qt Creator uses clang infrastructure for some of it plugins.

                      Do not presume things like that. If there was any recommendation to use the clang version Qt Creator uses internally, that would be documented.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      2
                      • D Offline
                        D Offline
                        Devanshu
                        wrote on last edited by
                        #11

                        HI, I have solved the same problem in Ubuntu 18 just by installing qt creator from the repository. In my case it was:

                         sudo apt-get install qtcreator
                        

                        This will install all necessary package by itself and then you can run your currently installed version, as this command, unfortunately, doesn't show docs and examples (in my case).

                        1 Reply Last reply
                        1
                        • I Offline
                          I Offline
                          imene
                          wrote on last edited by
                          #12

                          Hello
                          I'm working under Debian Os (bullseye) and i've face the same probleme while runing an existing project "clock", any idea how to fixe this ?
                          93a5322b-6431-4265-993b-8062f177b618-image.png

                          1 Reply Last reply
                          0
                          • I Offline
                            I Offline
                            imene
                            wrote on last edited by
                            #13

                            Solution:
                            Use the gcc compiler instead of clang++.

                            1 Reply Last reply
                            0
                            • J jarelsanders1986

                              I get the following error and Im unsure how to resolve the issue.

                              Project ERROR: Cannot run compiler 'clang++'. Output:

                              ===================
                              Maybe you forgot to setup the environment?
                              23:34:44: The process "/home/jarel/Qt/5.12.1/gcc_64/bin/qmake" exited with code 3.
                              Error while building/deploying project untitled (kit: Desktop Qt 5.12.1 GCC 64bit)
                              When executing step "qmake"

                              D Offline
                              D Offline
                              DC17k
                              wrote on last edited by
                              #14

                              @jarelsanders1986 Hello, I was having the same problem. What I did was open the package manager and look for c compiler packages. My standard version is clang11 and clang-cpp-11, I downloaded the following versions: clang13, clang14, along with the documentation. After the update, I opened my project and decided to build it... IT WORKED. QT Creator automatically recognized new compilers. So far I haven't found any problems. Hope my experience helped.

                              ![alt text](clangCapture.png image url)

                              1 Reply Last reply
                              0
                              • C CPPUIX referenced this topic on
                              • C Castro88

                                I had exactly the same issue on Ubuntu "18.04.2 LTS". I solved the problem by installing clang:

                                ~$ sudo apt install clang

                                D Offline
                                D Offline
                                Duke_11202
                                wrote on last edited by
                                #15

                                @Castro88 @greensh Thanks you. I did both two solutions and fixed my first problem.

                                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