如何在Windows上使用Clang作为编译器与Qt Creator? [英] How to use Clang as a compiler with Qt Creator on Windows?

查看:1901
本文介绍了如何在Windows上使用Clang作为编译器与Qt Creator?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的Windows 7上安装Qt SDK与Qt Creator。LLVM& Clang也安装了。 CMake已经安装。然后添加Clang作为编译器:
工具 - >选项... - >构建& Run - > Compilers

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

然后我创建了Clang kit。但是,在创建新项目(简单的控制台应用程序),我没有能力选择ang工具包。只有自动检测的MSVC工具包。

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.

也许问题是在Clt工具包中的Qt版本是空的。

Maybe the problem is that "Qt version" in Clang kit is empty. But where to get qmake for it?

推荐答案

你还应该有一个适当的编译Qt库与Clang。在下载页面中没有用于Windows的Clt构建。因此,您必须在您的机器上准备构建环境并编译Qt源,然后在套件的Qt版本字段中分配qmake二进制路径。或者只是使用另一个编译器Qt二进制版本已经存在于下载页面。

You should also have an appropriate compiled Qt library with Clang. There is no Clang build of Qt for Windows in the download page. So you have to prepare the build environment on your machine and compile the Qt source and then assign the qmake binary path in the "Qt version" field of your kit. Or simply use another compiler the Qt binary builds for which is already present at the download page.

这篇关于如何在Windows上使用Clang作为编译器与Qt Creator?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆