Clang toolchain configuration

  • Hello,
    in QtCreator 2.3 we got support for a Clang toolchain but I wasn't able to find any documentation, topics or tutorial how to set it up.
    In case of mingw I just download new version from, unpack it, add new toolchain in qtcreator, point to new exe and in project choose a new toolchain and everything work perfectly.
    In case of Clang I'm a bit confused what to download. I tried with Clang Binaries for Mingw32/x86 (2.9), I was able to add a new toolchain, Qtcreator set gdb as debugger on it's own. Then when I try to choose Clang as current toolchain in a project it says mingw32-make.exe cannot be found which is understandable. My question is what build step should I add to successfully use Clang as a toolchain? Is it enough just to change configuration or I will have to recompile Qt with CLang to succesfully link with libraries?
    Thanks in advance

    PS. If I didn't state my questions clearly, please tell me so I can rephrase :).

  • Moderators

    The answer depends a bit on the Qt version you are using.

    You need to have a mkspec for qmake to make use of clang. Qt 4.8 comes with those for linux and mac. Qt 4.7 does not have those yet!

    Clang still had huge problems on windows when I last tried it: It failed to parse basically all the windows headers correctly due to MS extensions clang did not support at that time. So if you want to use clang on windows make sure to grab a version built from SVN, the 3.0 version did not work for me.

  • I'm using fully updated Qt SDK on windows so it's Qt 4.7.4 atm. I just wanted to try Clang, so I can wait for a stable Qt 4.8 and working version of Clang for windows. There's no rush :). Thanks for answer.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.