Home > Backend Development > C++ > How to Build Qt for Visual Studio 2010 from Source?

How to Build Qt for Visual Studio 2010 from Source?

Patricia Arquette
Release: 2024-11-26 01:33:10
Original
400 people have browsed it

How to Build Qt for Visual Studio 2010 from Source?

Building Qt for Visual Studio 2010

Contrary to popular belief, using prebuilt Qt binaries designed for Visual Studio 2008 is not possible with Visual Studio 2010 due to dependency issues with Visual C 2008 Debug Runtime, which requires the full installation of Visual Studio 2008.

Step 1: Download Qt Source Files

Visit https://www.qt.io/download/ and select the "zip" link under "Qt libraries 4.8.6 for Windows (Visual Studio 2008, 218 MB)". Unzip the file into a desired location, such as "E:Qt".

Step 2: Open Visual Studio Command Prompt

Launch the "Microsoft Visual Studio 2010Visual Studio ToolsVisual Studio Command Prompt (2010)" shortcut. Navigate to the Qt source folder using DOS commands (e.g., "E:", "cd Qt").

Step 3: Configure and Build Qt

To configure Qt with minimal options, run the following command:

configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg
Copy after login

After configuration, run "nmake" to build Qt (estimated time: 20-30 minutes).

Step 4: Set Environment Variables

Set the following environment variables using either setx or Control PanelSystemEnvironment Variables:

  • QTDIR="e:Qt"
  • Add "Qtbin" to the PATH variable

Step 5: Install Qt Visual Studio Add-in

Download and install the Qt Visual Studio Add-in (qt-vs-addin-1.1.9.exe) from the Qt download page.

Note: After a restart or logoff-logon, Qt demo applications should now run correctly.

The above is the detailed content of How to Build Qt for Visual Studio 2010 from Source?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template