Three programming environments built under QT in Windows

Source: Internet
Author: User
Tags visual studio 2010

Respect the author, support the original, if you need to reprint, please attach the original address: http://blog.csdn.net/libaineu2004/article/details/17363165

Learn about the supported platforms, compilers, and debuggers from the QT website:

Http://qt-project.org/doc/qtcreator-3.0/creator-debugger-engines.html

(Home | Docs | Qt Creator 3.0 | Debuggingand Analyzing | Setting up Debugger)

This article mainly explains QT in the Windows operating system under the three kinds of programming environment constructs.

Scheme

Programming environment

Compiler

Debugger

One

Qt Creator

MinGW GCC

Gdb

Two

Qt Creator

Microsoft Visual C + + Compiler

Debugging Tools for Widows

Three

Microsoft Visual Studio 2010

VS2010 comes with

VS2010 comes with

Note that the QT Installer and compression package mentioned in the following scenarios can be downloaded to http://download.qt.io/official_releases/on the website.

Scenario One: Qt4.8.5for Windows (Qt creator+mingw)

1, install the compilation environment Qt-creator-win-opensource-3.0.0.exe first. Use the default path, C:\Qt\qtcreator-3.0.0.

2. Unzip the compiler tool Mingw-gcc440_1.zip. Please copy the inside folder MinGW to the path C:\QT\MINGW.

3. Unzip the debugger tool Gdb-7.5-i686_winxp.zip.

Please copy the inside folder Gdb-7.5-i686_winxp to the path C:\Qt\gdb-7.5-i686_WinXP.

4, the final installation library file Qt-win-opensource-4.8.5-mingw.exe.

The default installation path for QT is C:\Qt\4.8.5, which is proposed to be modified to C:\Qt\4.8.5_MinGW, which is intended to be separate from other QT repository areas. Avoid overwriting and destroying other QT versions that have been installed. (Note: The QT library that supports the Windows environment has mingw,vs2010,vs2008, etc.)

When the installation prompts find installed MinGW, the user points to the path C:\QT\MINGW.

5. After completing the steps above, perform the desktop shortcut qt Creator.

(1) Enter the software----menu, tools----Build and run manual settings,->QT version, add qmake path C:\Qt\4.8.5_MinGW\bin\qmake.exe.

(2) Build and run Build kit (KIT) with the tools---------------------------

Manager---Edit, browse, point to Debugger path C:\Qt\gdb-7.5-i686_WinXP\gdb-i686-pc-mingw32.exe.

The QT version is selected as "Qt 4.8.5 (4.8.5_MINGW)".

(3) Go to software----menu, tools----Build and run manual settings, compiler--------add MinGW, and set the appropriate path. Compiler path C:\Qt\mingw\bin\gcc.exe.

6. Accelerate QT compilation speed skills.

QT Default compilation is very slow, you can use the multi-core compilation method to improve speed.

Replace the Mingw32-make.exe with Jom.exe when you enter the software and open the project, such as build and run, projects, toolbars, and so on.

Scenario Two: Qt4.8.5for Windows (Qt creator+vc++ Compiler)

(I) For cases where the computer is not installed and does not intend to install VS2010:

1. You must ensure that the computer has the Microsoft. NET Framework 4.0 and later installed. Otherwise, the 2nd step will fail to install.

2, install Microsoft Official Microsoft Windows SDK for Windows 7 and. NET Framework 4 (ISO),

http://msdn.microsoft.com/en-us/windows/hardware/hh852365

http://www.microsoft.com/en-us/download/details.aspx?id=8442

The official website can be downloaded to the development Kit Grmsdk_en_dvd.iso, which supports the WinXP and Win7 operating systems.

, which is installed according to the default options. Among them, the contents of the Red box are VC + + header file and link library; VC + + compiler; VC + + debugger. These are required features that correspond to the files in the ISO disc image:

\winsdkbuild\ Winsdkbuild_x86.msi

\vc_stdx86\vc_stdx86.msi

\winsdkdebuggingtools\dbg_x86.msi

3, install the compilation environment Qt-creator-opensource-windows-x86-3.0.0.exe. Use the default path, C:\qt\qtcreator-3.0.0.

4. Install the QT for vs2010 library file, please run Qt-win-opensource-4.8.5-vs2010.exe.

The default installation path for QT is C:\Qt\4.8.5, which is proposed to be modified to C:\Qt\4.8.5_VS2010, which is intended to be separate from other QT repository areas. Avoid overwriting and destroying other QT versions that have been installed. (Note: The QT library that supports the Windows environment has mingw,vs2010,vs2008, etc.)

5. After completing the steps above, perform the desktop shortcut qt Creator. The Qt creator can automatically detect VC + + compilers.

(1) Enter the software----menu, tools----Build and run manual settings,->QT version, add qmake path C:\Qt\4.8.5_VS2010\bin\qmake.exe.

(2) Build and run Build kit (kit) with options-------tools---------------menu----------Choose Microsoft Windows sdkfor Windows 7 (x86) The debugger selects auto-detected CDB at C:\Program files\debugging Tools for Windows (x86) \cdb.exe.

(3) Enter software--menu, tools----Debugger->cdb paths->symbolpaths-> Insert (mouse click the small arrow), symbol server, OK (default value).

(II) For cases where the computer has VS2010 installed:

1, install the compilation environment Qt-creator-opensource-windows-x86-3.0.0.exe. Use the default path, C:\qt\qtcreator-3.0.0.

2. Install the QT for vs2010 library file, please run Qt-win-opensource-4.8.5-vs2010.exe.

The default installation path for QT is C:\Qt\4.8.5, which is proposed to be modified to C:\Qt\4.8.5_VS2010, which is intended to be separate from other QT repository areas. Avoid overwriting and destroying other QT versions that have been installed. (Note: The QT library that supports the Windows environment has mingw,vs2010,vs2008, etc.)

3. Install debugging Tools for Windows. Please run Dbg_x86.msi. This is the debugger. Press complete to install it. This tool is extracted from Microsoft's official Microsoft Windows SDK for Windows 7 and. NET Framework 4 (ISO) and can be downloaded to development package Grmsdk_en_dvd.iso.

http://msdn.microsoft.com/en-us/windows/hardware/hh852365

http://www.microsoft.com/en-us/download/details.aspx?id=8442

4. After completing the steps above, perform the desktop shortcut qt Creator. The Qt creator can automatically detect VC + + compilers.

(1) Enter the software----menu, tools----Build and run manual settings,->QT version, add qmake path C:\Qt\4.8.5_VS2010\bin\qmake.exe.

(2) Build and run Build kit (kit) with options, tools---------------menu--------------Choose "Microsoft Visual C++compiler 10.0 (x86)" The debugger selects auto-detected CDB at C:\Program files\debugging Tools for Windows (x86) \cdb.exe.

(3) Enter software--menu, tools----Debugger->cdb paths->symbolpaths-> Insert (mouse click the small arrow), symbol server, OK (default value).

Scenario Three: Qt4.8.5for Windows (Vs2010+vs plugin)

1, must ensure that the computer has installed VS2010.

2. Install the QT for vs2010 library file, please run Qt-win-opensource-4.8.5-vs2010.exe.

The default installation path for QT is C:\Qt\4.8.5, which is proposed to be modified to C:\Qt\4.8.5_VS2010, which is intended to be separate from other QT repository areas. Avoid overwriting and destroying other QT versions that have been installed. (Note: The QT library that supports the Windows environment has mingw,vs2010,vs2008, etc.)

3, install VS2010 QT plug-in, please run Qt-vs-addin-1.1.11-opensource.exe. The installation path of the plug-in is C:\ProgramFiles\Digia\Qt4VSAddin, which can be installed by default, without modification.

Respect the author, support the original, if you need to reprint, please attach the original address: http://blog.csdn.net/libaineu2004/article/details/17363165

Welcome to visit the sister article "QT programming environment under MAC OS x build"!

Three programming environments built under QT in Windows

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.