在 MSVC 2015 编译器中使用 QT Creator 5.8 [英] Using QT Creator 5.8 with MSVC 2015 compiler

查看:81
本文介绍了在 MSVC 2015 编译器中使用 QT Creator 5.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 C++ 和编程的新手,我正在尝试使用 QtQt Creator 开发一个小项目.

I'm new to C++ and programming, and I'm trying to work on a little project, using Qt and Qt Creator .

我使用的是 MinGW 编译器,但对于这个项目,我需要使用 MSVC 编译器(因为我需要使用 QtWebEngineWidgets>).

I was using the MinGW compiler, but for this project I will need to work with the MSVC compiler (since I need to use QtWebEngineWidgets).

我有 Qt 5.8 并且我正在使用 Qt Creator.我下载了 Microsoft Visual Studio 2015(社区).

I have Qt 5.8 and I'm using Qt Creator. I downloaded Microsoft Visual Studio 2015 (Community).

现在,如果我进入我项目的工具包部分,它会说MSVC 工具包没有编译器.

Now, if I go on the kit section of my project, it says that the MSVC kit has no compiler.

我去了编译器部分,我看到了Microsoft Visual C++ Compiler 14.0 (x86),但调试器部分没有任何内容,只有用于 MinGW 的 GNU gdb.

I went to the compiler section, and I see Microsoft Visual C++ Compiler 14.0 (x86), but nothing in debuggers section, only GNU gdb for MinGW.

我必须安装另一个调试器,还是我已经有了好的调试器?如果是,我如何找到并设置它?

Must I install another debugger, or do i already have the good one? If yes, how can I find and set it?

非常感谢您的帮助,如果我的英语不完美,请见谅!

Thank you a lot for your help, and sorry if my english isn't perfect!

非常感谢您的回答!

我已经按照第一个答案中的链接安装了 wdk 和 winsdk 2015(1703 版本).

I have followed the link in first answer, and installed wdk and winsdk 2015 (1703 version).

现在,在工具/选项/调试器中,我可以在 Windows Kits 文件夹中看到 2 个调试器,即自动检测的 cdb.exe(x86 和 x64).我的电脑是 x64,但我知道 x86 版本可能可以正常工作,所以我正在尝试使用它.

Now, in Tools/Options/Debuggers, I can see 2 debuggers, autodectected cdb.exe (x86 and x64) in Windows Kits folder. My computer is x64 but I know that x86 version may work fine on so I'm trying to work with it.

我尝试将它们添加到工具包中,并使用 Microsoft Visual C++ Compiler (x86) 作为编译器.

I tried to add them in the kit, and used Microsoft Visual C++ Compiler (x86) as compiler.

不幸的是,这仍然不起作用:我收到一条错误消息.

Unfortunately this still doesn't work: I've got an error message.

18:07:19:Exécution des étapes Pour le projet JusticeNavigator... 18:07:19:Débute:C:\Qt\5.8\msvc2015\bin\qmake.exe"C:\Users\Moufid\桌面\Projets\Qt\JusticeNavigator\JusticeNavigator.pro-spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug" 18:07:21: Le processus "C:\Qt\5.8\msvc2015\bin\qmake.exe" s'est terminé normalement.18:07:21:首演:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" qmake_all 18:07:21:Le processusC:\Program Files (x86))\Microsoft Visual Studio14.0\VC\bin\amd64_x86\cl.exe"崩溃.Erreur lors de la compilation/déploiement du projet JusticeNavigator(套件:桌面 Qt5.8.0 MSVC2015 32bit) 执行步骤qmake"时

18:07:19: Exécution des étapes pour le projet JusticeNavigator... 18:07:19: Débute : "C:\Qt\5.8\msvc2015\bin\qmake.exe" C:\Users\Moufid\Desktop\Projets\Qt\JusticeNavigator\JusticeNavigator.pro -spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug" 18:07:21: Le processus "C:\Qt\5.8\msvc2015\bin\qmake.exe" s'est terminé normalement. 18:07:21: Débute : "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" qmake_all 18:07:21: Le processus "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" a crashé. Erreur lors de la compilation/déploiement du projet JusticeNavigator (kit : Desktop Qt 5.8.0 MSVC2015 32bit) When executing step "qmake"

信息是法语,但很容易理解.

The message is in French but it is easy to understand.

推荐答案

根据 Qt Creator 文档,Visual Studio 不提供所需的调试工具:

As per the Qt Creator documentation, Visual Studio does not provide the debugging tools needed:

要使用 CDB 调试器,您必须安装适用于 Windows 的调试工具.您可以从下载并安装 Windows 调试工具下载它们.注意:Visual Studio 不包含所需的调试工具,因此您必须单独安装它们.

To use the CDB debugger, you must install the Debugging tools for Windows. You can download them from Download and Install Debugging Tools for Windows. Note: Visual Studio does not include the Debugging tools needed, and therefore, you must install them separately.

Windows 预构建的 Qt 会使用该库(如果该库存在于系统中).使用 Microsoft Visual C++ 编译器手动构建 Qt Creator 时,构建过程会检查%ProgramFiles%\Debugging Tools for Windows"中的所需文件.

The pre-built Qt for Windows makes use of the library if it is present on the system. When manually building Qt Creator using the Microsoft Visual C++ Compiler, the build process checks for the required files in "%ProgramFiles%\Debugging Tools for Windows".

强烈建议您将微软提供的 Symbol Server 添加到调试器的符号搜索路径中.Symbol Server 为您提供用于调试 Windows 应用程序的操作系统库的调试信息.有关详细信息,请参阅在 Windows 上设置 CDB 路径.

It is highly recommended that you add the Symbol Server provided by Microsoft to the symbol search path of the debugger. The Symbol Server provides you with debugging informaton for the operating system libraries for debugging Windows applications. For more information, see Setting CDB Paths on Windows.

适用于 Windows 的调试工具目前可在此处获得:https://developer.microsoft.com/en-us/windows/hardware/download-windbg

The Debugging tools for Windows are currently available here: https://developer.microsoft.com/en-us/windows/hardware/download-windbg

这篇关于在 MSVC 2015 编译器中使用 QT Creator 5.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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