[Installation] debugging of QT creator + mingw in Windows

Source: Internet
Author: User

[Reprinted] debugging of QT creator + mingw in Windows

For the installation and configuration of QT, refer to other related articles in this blog. This article mainly describes the problems and solutions encountered during debugging for your reference. I didn't have any development foundation for Qt before, and I did hardware design, so the foundation is still relatively weak. Here I will mainly record some experiences in the process of exploration.

For the installation and preliminary configuration of QT, see: QT creator configuration and development preliminary test.

The software environment in this article:

Win7 32bit

Qt 4.8.4

Qt creator 2.6.1

Mingw 4.4

After exploring QT and opencv for a period of time, the three platforms are involved. The biggest problem is that the resources are too scattered and there are still differences between versions, it is still a little troublesome for beginners like me.

I used QT debugging today and encountered a small problem. Here is a simple record.

During debugging, QT creator prompts that the debugger is not set and has not been noticed in the previous configuration. So let's take a look at it again. I am using mingw, therefore, the settings shown are displayed after automatic detection.

The program detected the debugger at D: \ mingw \ bin \ gdb.exe. I thought this would work, but it was impossible to run it during debugging. The upgrade (shown below:

However, you can only find a way to find out. In the previous QT creator, it was provided as a whole by a qt sdk, including mingw and debugger, in addition, no configuration is required. The new versions are all installed separately, so you need to find them separately. One statement on the internet is that GDB of Version 2.5 and later must be used. You need to download it separately. Here I find two.

Http://qt-project.org/wiki/QtCreatorBuildGdb

Paste the content as follows:

Building GDB

For Windows

A msys environment with mingw is required to build the gdb on Windows.
If it is missing
Download[Sourceforge.net]And install it to your system.

Building
  • Go to QT-Creator/Dist/GDB
  • The directory has 3 makefiles:Linux,OSXAndMingw. Use the one that corresponds to your host OS.
  • In case you need additional targets, edit the line starting with 'Targets = 'in the makefile.
  • Run:
    1. Make-F makefile. <Linux | OSX | mingw>

Shipping
  • Extract qtcreator-GDB-<GDB version>-

Testing
  • To test GDB just run the executable and type:

    1. Python print 23

  • When the gdb prints "23" everything works fine.

Downloads
  • GDB 7.5 Binaries
    Origin.releases.qt-project.org
  • Compiled python for Windows[Get.qt.nokia.com]
Categories:
  • Tools

    • Qtcreator
    • The text below shows what I can't understand, and I didn't find the path QT-Creator/Dist/GDB. I downloaded GDB 7.5 release from downloads, decompress the package directly with WinRAR. The folder content is as follows:

Reconfigure QT creatorto set the receiver to gdb-686-pc-mingw32.exe in this directory, as shown in. debug again to perform debugging.

Another http://builds.qt-project.org/job/gdb-windows/ can also download this file.

Linux related settings have the corresponding file, as follows: http://builds.qt-project.org/view/GDB/job/gdb-unix/label=ubuntu32-builder-1004/
There is no test.

Article transferred from: http://emouse.cnblogs.com
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.