To statically compile the QT SDK under Windows

Source: Internet
Author: User

1. Conditions of Use:

(1) System: Widows XP Radish version

(2) qt:qt4.6.2 Windows edition

2. Use steps:

(1) Statically compiling QT

A: Set qmake.conf

Use Notepad to open the qmake.conf under d:\qt\2010.02.1\qt\mkspecs\win32-g++

Add "-static" after "Qmake_lexflags =" and save exit.

B: Run, "Start---program---Qt SDK by Nokia v2010.02.1 (open source)---

Qt command Prompt, open a command terminal.

C: Configure the compilation parameters by typing the following command:

Configure-static-release-no-exceptions

Start configuring Qmake, license with LGPL

D: Use the following command to statically compile the QT library:

Mingw32-make SUB-SRC

3. Remove the various library files dependent methods:

Using static versions of MinGW and GCC

Static version of the download address:

http://code.google.com/p/qp-gcc/

FileName: Mingw-static-4.4.5-all

Extract the above file: Direct coverage: D:\QT\2010.02.1\MINGW files

4. Modify the following folder D:\Qt\2010.02.1\qt\qmake:

Makefile* A total of four files:

Change the "lflags =" to: "Lflags=-STATIC-LIBGCC"

5. When debugging the program: Use the Qtcreator Debugy method.

When you publish a program: Use the Qtcreator release method. You can run your application on a computer that does not have QT.

This article from "LINUXQT Jinan high-tech Zone" blog, please be sure to retain this source http://qtlinux.blog.51cto.com/3052744/568619

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/cplus/

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.