Home > Database > Mysql Tutorial > body text

VS2013编译Qt5.2.0 32位静态库debug

WBOY
Release: 2016-06-07 15:38:58
Original
1261 people have browsed it

1. 下载zip源码,我下载的是qt-everywhere-opensource-src-5.2.0.zip这个文件。 2.安装python 3.解压缩qt-everywhere-opensource-src-5.2.0.zip文件,修改 qtbase\mkspecs\win32-msvc2013\qmake.conf文件,将 [cpp] view plaincopy QMAKE_CFLAGS_RELEASE=-O2

1. 下载zip源码,我下载的是qt-everywhere-opensource-src-5.2.0.zip这个文件。

2.安装python

3.解压缩qt-everywhere-opensource-src-5.2.0.zip文件,修改

qtbase\mkspecs\win32-msvc2013\qmake.conf文件,将

[cpp] view plaincopy

  1. QMAKE_CFLAGS_RELEASE    = -O2 -MD  
  2. QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi  
  3. QMAKE_CFLAGS_DEBUG      = -Zi -MDd  

改为

[cpp] view plaincopy

  1. QMAKE_CFLAGS_RELEASE    = -O2 -MT  
  2. QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi  
  3. QMAKE_CFLAGS_DEBUG      = -Zi -MTd  

4.在vs2013开发人员命令提示界面运行configure,我使用的配置参数为:

[python] view plaincopy

  1. configure -confirm-license -opensource -platform win32-msvc2013 -debug-and-release -static -prefix "D:\Qt\5.2.0-static-vs2013" -qt-sql-sqlite -qt-sql-odbc -plugin-sql-sqlite -plugin-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -opengl desktop -qt-freetype -no-qml-debug -no-angle -nomake tests -nomake examples -skip qtwebkit     

5.使用nmake开始编译,i7-3520m双核,4G内存的配置下,大约3小时编译完成。

6.使用nmake install安装到指定目录。


比较惊喜的是,这样在win8.1+vs2013的环境下编译出的Qt5静态库,直接兼容WinXP。


最后分享编译结果,百度网盘下载

http://pan.baidu.com/s/1eQ1fj8m

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template