带有 Visual C++ 11 的 Qt Creator [英] Qt Creator with Visual C++ 11

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

问题描述

我想在 MS VC++ 11 中使用 Qt Creator,但它说没有工具链来构建 Qt.我使用完整的 SDK 安装程序安装了 Qt.现在该怎么办?

I want to use Qt Creator with MS VC++ 11 but it says there is no toolchain to build Qt. I installed Qt with the full SDK installer. What to do now?

推荐答案

MSVC++ 11 不是随 Visual Studio 11 一起提供的吗?如果是这样,那么 Qt 不支持该版本 AFAIK 的 makespec 文件(如果我错了,请纠正我).但以下是使用 MSVC 2010 nmake/cl 工具链运行 Qt Creator 的(粗略)步骤..

Isn't MSVC++ 11 comes with Visual Studio 11? If so then Qt hasn't supported makespec file for that version AFAIK (correct me if I am wrong). But following are the (rough) steps for running Qt Creator with MSVC 2010 nmake/cl tool-chain..

  1. 从这个站点msvc-2010工具链下载使用msvc-2010编译的Qt SDK 4.8.2a>(第二页).
  2. 安装 MS VC++ 2010 免费开发工具(或完整 SDK),其中包含 nmake/cl/cdb 可执行文件.
  3. 重启电脑以初始化环境变量等.
  4. 启动Qt Creator,此时您会注意到msvc-2010 工具链已被Qt Creator 识别(工具-> 选项对话框).如果没有,则手动添加它.
  5. 还要确认 msvc-2010 的 Qt 版本 4.8.2 已在 Qt 版本 选项卡中标识.如果没有,则通过在 Qt SDK 文件夹的 bin 中给出 qmake 的路径手动添加它.它还会自动选择 msvc-2010 工具链.
  6. 好的,现在转到项目"并在构建设置"中选择 msvc-2010 工具链并编译.确保选择 win32-msvc2010 作为 makespec 文件.
  1. Download Qt SDK 4.8.2 compiled using msvc-2010 toolchain from this site (second page).
  2. Install MS VC++ 2010 free development tools (or full SDK), which comprises of nmake/cl/cdb executables.
  3. Restart PC so as to initialize environment variable and all.
  4. Start Qt Creator, by now you will notice msvc-2010 tool-chain has been identified by Qt Creator (Tools -> Options Dialog). If not then manually add it.
  5. Also confirm that Qt version 4.8.2 of msvc-2010 has been identified in Qt Versions tab. If not then manually add it by giving path of qmake in bin of Qt SDK folder. It will also select msvc-2010 tool-chain automatically.
  6. Here you go, now go to Projects and in Build Settings, select msvc-2010 tool-chain and compile. Make sure win32-msvc2010 is selected as makespec file.

希望这会有所帮助.

这篇关于带有 Visual C++ 11 的 Qt Creator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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