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 to use Clang for compiling projects in Qt creator for Windows machine
Forum Updated to NodeBB v4.3 + New Features

How to use Clang for compiling projects in Qt creator for Windows machine

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 2.9k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    desmondcrozby
    wrote on 27 Sept 2016, 11:18 last edited by desmondcrozby
    #1

    I want to set up a Windows machine which will have Qt Creator installed on it and will use the Clang for building/compiling the projects.

    1. I installed the Qt using: https://www.qt.io/download-open-source/ ; now I have Qt Creator 4.1.0 , and Qt ver 5.7 and 5.6 on this Windows 7 machine.
    2. I installed Clang 3.8 using pre-built binaries: http://llvm.org/releases/download.html and added Clang to the path.

    I tried to add manually the Clang to the "Compilers" in the "Build & Run", and then use it for one of the manually created "Kits" for my project. However the kit complains that: "The ABI of the selected debugger does not match the toolchain ABI" and "The compiler Clang can not produce code for Qt version "<both 5.6.1 and 5.7 occurred here>".

    Now if any of you have managed to get Qt creator to play nicely with Clang on a Windows 7 machine, I would appreciate if you can provide a step-by-step guide on setting up the system.

    I googled around but most of the discussion is in the high level between guys experienced with those toolchains thus it does not provide a lot of insight to a newbie like me.

    For example I found the following posts:

    1. on SO: http://stackoverflow.com/questions/32533043/how-to-use-clang-as-a-compiler-with-qt-creator-on-windows
    2. in here: https://forum.qt.io/topic/17050/how-can-i-build-project-using-clang-with-qtcreator
    K 1 Reply Last reply 27 Sept 2016, 11:38
    0
    • D desmondcrozby
      27 Sept 2016, 11:18

      I want to set up a Windows machine which will have Qt Creator installed on it and will use the Clang for building/compiling the projects.

      1. I installed the Qt using: https://www.qt.io/download-open-source/ ; now I have Qt Creator 4.1.0 , and Qt ver 5.7 and 5.6 on this Windows 7 machine.
      2. I installed Clang 3.8 using pre-built binaries: http://llvm.org/releases/download.html and added Clang to the path.

      I tried to add manually the Clang to the "Compilers" in the "Build & Run", and then use it for one of the manually created "Kits" for my project. However the kit complains that: "The ABI of the selected debugger does not match the toolchain ABI" and "The compiler Clang can not produce code for Qt version "<both 5.6.1 and 5.7 occurred here>".

      Now if any of you have managed to get Qt creator to play nicely with Clang on a Windows 7 machine, I would appreciate if you can provide a step-by-step guide on setting up the system.

      I googled around but most of the discussion is in the high level between guys experienced with those toolchains thus it does not provide a lot of insight to a newbie like me.

      For example I found the following posts:

      1. on SO: http://stackoverflow.com/questions/32533043/how-to-use-clang-as-a-compiler-with-qt-creator-on-windows
      2. in here: https://forum.qt.io/topic/17050/how-can-i-build-project-using-clang-with-qtcreator
      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 27 Sept 2016, 11:38 last edited by
      #2

      @desmondcrozby said in How to use Clang for compiling projects in Qt creator for Windows machine:

      "The ABI of the selected debugger does not match the toolchain ABI" and "The compiler Clang can not produce code for Qt version "<both 5.6.1 and 5.7 occurred here>"

      Start there. Make sure that Qt's ABI is compatible with the one produced by clang. This basically means that you should make sure that you use matching 32/64bit compiled binary for Qt and that your Qt binary is compiled with clang (the same version). Have you compiled Qt with clang?

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0

      1/2

      27 Sept 2016, 11:18

      • Login

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