Can not debug using Qt Creator on Windows - qt

I am new to Qt. I have just installed Qt SDK version 1.2.
My platform is windows 7 64 bit
Visual Studio 2010 pro 32 bit installed ..
Now I have installed Qt SDK 1.2 (which has Qt creator)
I have created a test project and it runs fine but I can not debug it.
When I debug the program I get this error message
The preferred debugger engine for debugging binaries of type 'x86-windows-msvc2010-pe-32bit' is not available.
The debugger engine 'Gdb engine' will be used as a fallback.
Details: There is no CDB binary available for binaries in format 'x86-windows-msvc2010-pe-32bit'
It seeems to automatically have picked up my vs 2010 compiler as I can see in the project build settings but seems like it can not use the debugger for some reason..

According to this documentation, you need to download and install the Debugging tools for Windows.

Related

Setup qtcreator using Microsoft Enterprise WDK

I'm trying to setup qtcreator using Microsoft Enterprise WDK.
I want to build MSVC and UWP apps, but I do not want to install MS VisualStudio.
Does anyone know howto setup debugger cdb, c and c++ compiler, ... for qtcreator. Since MS EWDK is unzipped in a folder like C:\Dev qtcreator cannot auto-detect it.
I also flipped through the QT documentation, but it is confusing me.
I still have no solution to integrate EWDK into qtcreator.
But there is an alternative to install a "minimum" Microsoft environment for qtcreator:
Install the Visual Studio Build-Tools, which is new as of 2017 and only select the build-tools for C++
Install only the debugger from Windows SDK

Can't run Qt application under UWP kit

My app is Qt Quick Controls 2 based app. Qt 5.7.1, Windows 10, Visual Studio 2015.
Desktop 32bit version works fine.
But when I switch to Qt 5.7.1 for Universal Windows Platform 32bit kit, it fails to run with the following error:
winrtrunner --device 0 --start --stop --install --wait 0 --profile appx C:/Work/Source/build-MusicPlayer-Qt_5_7_1_for_Universal_Windows_Platform_32bit-Release/bin/player.exe
qt.winrtrunner: Using the Appx profile.
qt.winrtrunner: Failed to activate application: 0x8027025b "The app didn't start."
Error while executing the WinRT Runner Tool: Process crashed
It states here that some dependency is missing. I've checked it using Dependency Walker and it seems that all the required DLLs are in the application's folder. I've also tried to copy just all the files from Qt kit installation into app's dir.
My application consists of one main executable and three .DLL files. I've launched windeployqt for the each of them. Tried both debug and release versions.
I have the same problem on Windows 10, Qt 5.8 (also 5.7), Windows Runtime 64bit VC2015.
This topic was opened on Qt website here: https://forum.qt.io/topic/73272/qt-5-7-for-winrt-and-dynamic-libraries, but it did not help in my case :(. I opened a new topic here: https://forum.qt.io/topic/75424/cannot-start-qt-quick-winrt-application
I had same issue.
You need to recompile all static / dynamic libraries that your application uses for Windows 10 SDK. The issue is that you need to use WinRT dll's which provide sandbox environment instead of "normal" Windows libraries. Windows Store applications require that.
In my case I was using zip static library (zlibstat.lib) with Quazip static library (quazip.lib), compiled in Windows 7 with Visual Studio 2012.
Instead, I used Qt zip, as Qt provides zip library inside QtCore.dll, (just use #include instead of #include "zlib.h") and recompiled Quazip as a static library for Windows 10 SDK.

Qt Creator cannot set debugger for 64bit (despite installed and properly detected)

My setup consists of Microsoft Visual Studio Express 2013 and Qt 5.5.1. For the Debugger(s) I use CDB from the Windows SDK. I use both toolchains, 32bit and 64bit.
To clean up my machine, I recently deinstalled all Microsoft Visual Studio stuff including the debuggers. Now, after the new installation of all the tools, I am not able to set up the 64bit debugger anymore. The interesting thing is that both debuggers are correctly autodetected under the Debuggers tab Tools -> Options -> Debuggers.
Under the Kits tab, I see the yellow triangle on the 64bit entry. I also see that None is selected in the Debugger line. But I am not able to change this setting because it is deactivated.
I finally found a solution to this problem by editing a Qt Creator configuration file manually. The file toolchains.xml is found here in Windows 7:
%APPDATA%\Roaming\QtProject\qtcreator
Additional Note:
Since the original post, I've updated to Visual Studio 2015 Express and Qt 5.6. This environment is a lot simpler to set up than VS2013.

QT Creator (2.8.1) debugger on windows 7 for qtquick/C++

Hy,
i have installed qt 5.1.1 and QT Creator 2.8.1 to start learning QT Quick.
My only problem is i can not debug the c++ code!
If i hit F5 it always quits with "Not possible"-"No Debugger defined" (or something similar).
I have the Visual Studio Professional 2012 Edition installed (so there has to be a debugger on my maschine).
I also read "http://doc.qt.digia.com/qtcreator-2.4/creator-debugger-engines.html" but this realy does not help, it only says: "On Windows supported debuggers are: CDB or GDB. But CDB will not be detecte automatically and you have to install it manually and install some Windows Debugging Tools and set a symbol server...", which i tryed, but my maschine quit the download installation of Windows Debugging Tools with some undefined error
(
Installation Failed:
A problem occurred while installing selected Windows SDK components.
Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.
Please attempt to resolve the problem and then start Windows SDK setup again. If you continue to have problems with this issue, please visit the SDK team support page at http://go.microsoft.com/fwlink/?LinkId=130245.
[SDKSetup:Error] Config_Products_Install: Windows SDK Setup (failed): Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Stack: bei SDKSetup.Product.ConfigureNewProduct(ManualResetEvent CancelEvent) bei SDKSetup.Product.SetupProduct(TaskMode taskMode, ManualResetEvent CancelEvent) bei SDKSetup.ProductCollection.SetupProducts(TaskMode taskMode, DownloadManager downloadManager, ManualResetEvent cancelEvent) bei SDKSetup.ConfigProducts.DoCurrentTask(TaskMode Task)
).
Than i thought lets try GDB. I downloaded MinGW Installer which run for 10 min.
And now???
So my question is : "How to set a debugger in qtCreator on Windows 7 (if Windows Debugging Tools are unavailable, or how to make them available)?"
Thanks
Try the "Standalone Debugging Tools for Windows 8.1" from http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx (scroll down).
There are also the "Windows 7 Standalone Debugging Tools (also for Windows XP)", but I assume it's not working, because your installed Visual Studio 2012 is maybe too new. It states:
Newer versions of the Visual C++ 2010 Redistributable can cause issues when installing the SDK for Windows 7. For more information, see support for the Windows SDK.

Installing Qt5.1.1 and making it run with Visual Studio 2010

I am trying to install Qt5.1.1 and have already installed VStudio 2010 Pro, but I stll get the error saying Qt needs a compiler set up to build.
I looked it up, and I only find very complex solutions that are impossible for me to implement.
Can anyone give me specific directions on how I can get Qt5.1.1 working in my laptop?
Btw in case you couldn't tell, I'm a newbie.
Thanks
First, ensure that your Visual Studio installation contains a 32-bit compiler (the official Visual Studio 2010 packages only support 32-bit compilers)
Then, ensure that you've downloaded and installed one of the packages that are marked "Qt 5.1.1 for Windows 32-bit (VS 2010)" from http://qt-project.org/downloads
If Qt Creator still doesn't auto-detect your compiler, add it manually: http://qt-project.org/doc/qtcreator-2.8/creator-tool-chains.html
If you had to add your compiler manually, also add a Kit to combine your compiler with your Qt libraries: http://qt-project.org/doc/qtcreator-2.8/creator-targets.html

Resources