How to use Clang for compiling projects in Qt creator for Windows machine
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.
- 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.
- 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:
"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?