Qt Creator的编译器配置 [英] Compiler configuration for Qt Creator

查看:1246
本文介绍了Qt Creator的编译器配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Qt及其IDE Qt Creator的新手,请原谅我的无知. 当我尝试编译代码时,出现异常

I am new to Qt and its IDE Qt Creator so pardon my ignorance. When I try to compile my code I get the exception

"Qt Creator需要设置编译器才能构建.在工具箱选项中配置编译器."

"Qt Creator needs a compiler set up to build. Configure a compiler in the kit options".

我已经安装MingGW来编译C ++代码. 但是,在为Qt Creator进行配置时遇到了问题.

I have installed MingGW for compiling C++ code. However, I am having a problem configuring it for Qt Creator.

任何帮助将不胜感激.谢谢

Any help will be appreciated. Thanks

推荐答案

我怀疑您正在使用新的5.0 Qt.我也需要一点刺激.

I suspect you are using the new 5.0 Qt. It required a bit of prodding for me too.

如果您查看Settings > Build & Run > Kits,应该会看到一个自动检测到的条目,该条目前面可能带有感叹号,并且不可编辑.忽略这个.

If you look into Settings > Build & Run > Kits you should see an auto-detected entry which will probably have an exclamation mark in front and is not editable. Ignore this.

  • 添加新套件
  • 给它起个名字,设置"Qt版本"并选择一个编译器. (应该已经自动检测到编译器.如果看不到任何编译器,则必须至少手动设置一个)
  • 单击设为默认"按钮. (您可能也必须修改项目构建设置才能使用新工具包)
  • Add a new Kit
  • Give it a name, set the "Qt version" and select a compiler. (Compilers should have been auto-detected. If you do not see any compilers, you will have to set at least one up manually)
  • Click the "Make Default" button. (You may have to modify project build settings to use the new Kit too)

也许有更好的方法,但是我不知道.并且您可能应该使用4.x,直到5超出beta.

There may be a better way, but I do not know it. And you should probably use 4.x until 5 is out of beta.

这篇关于Qt Creator的编译器配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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