Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Clang with Qt on Windows
QtWS25 Last Chance

Using Clang with Qt on Windows

Scheduled Pinned Locked Moved General and Desktop
clangwindows
6 Posts 3 Posters 9.2k 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.
  • W Offline
    W Offline
    walking.in.the.air
    wrote on 12 Sept 2015, 12:14 last edited by
    #1

    I've installed Qt SDK with Qt Creator on my Windows 7. LLVM & Clang installed as well. CMake was already installed. Afterwards added Clang as a compiler into: Tools -> Options... -> Build & Run -> Compilers

    Then I've created Clang kit. However while creating new project (simple console application) I've no ability to choose Clang kit. There are only autodetected MSVC kits.

    What I've missed and how should I use Clang with Qt?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      t3685
      wrote on 12 Sept 2015, 13:02 last edited by
      #2

      Hi,

      Did you check whether the clang kit was fully configured?
      Also, you probably need a qt libraries compiled with clang for this to work, do you have those? I can't recall whether they are available or not.

      W 1 Reply Last reply 12 Sept 2015, 15:25
      1
      • T t3685
        12 Sept 2015, 13:02

        Hi,

        Did you check whether the clang kit was fully configured?
        Also, you probably need a qt libraries compiled with clang for this to work, do you have those? I can't recall whether they are available or not.

        W Offline
        W Offline
        walking.in.the.air
        wrote on 12 Sept 2015, 15:25 last edited by
        #3

        @t3685 It seems that you're right - there is an empty "Qt version" field in Clang kit. To add this I need some qmake (don't know which).
        I haven't compiled anything. Why this should be done: Qt already have compiled dlls? Could you give some documentation for this - it would be great to understand the point.
        Thank you for help!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          t3685
          wrote on 12 Sept 2015, 17:26 last edited by
          #4

          Hi,

          The qmake exe can be found in the Qt install folder of the SDK. From your answer I am assuming you don't have a lot of experience with C++. C++ applications can only use libraries built with the same compiler as the application. In your case you want to use clang so you need Qt libraries compiled with clang.
          Qt provides a number of versions of SDK for different compilers. You need to make sure that you downloaded the right one - if it exists.

          Greetings,

          t3685

          1 Reply Last reply
          1
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 12 Sept 2015, 19:12 last edited by
            #5

            Hi and welcome to devnet,

            There's no pre-built package for Clang on Windows. I don't know if it would even be compatible with the MinGW version of Qt.

            So if you'd like to avoid Visual Studio, just download the MinGW Qt version. It's provided with MinGW so you don't have to download it from somewhere else.

            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
            • W Offline
              W Offline
              walking.in.the.air
              wrote on 12 Sept 2015, 20:09 last edited by
              #6

              Yes, I'm newbie in C++ and didn't know the problem with different libraries and compilers. Now it is clear. Thank you very much!

              1 Reply Last reply
              0

              1/6

              12 Sept 2015, 12:14

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved