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
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
15 Posts 9 Posters 32.1k 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.
  • C Offline
    C Offline
    Castro88
    wrote on 24 Feb 2019, 22:38 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 14 May 2019, 16:11
    2
    • C Castro88
      24 Feb 2019, 22:38

      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 14 May 2019, 16:11 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
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 14 May 2019, 19:28 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 14 May 2019, 22:10
        1
        • S SGaist
          14 May 2019, 19:28

          @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 14 May 2019, 22:10 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
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 15 May 2019, 21:21 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 24 May 2019, 18:43 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 17 Jul 2022, 20:22 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 18 Jul 2022, 09:18 last edited by
                  #13

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

                  1 Reply Last reply
                  0
                  • J jarelsanders1986
                    3 Feb 2019, 21:37

                    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 4 Dec 2022, 22:53 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 24 Apr 2023, 14:40
                    • C Castro88
                      24 Feb 2019, 22:38

                      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 1 Feb 2024, 03:55 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