Build a static Qt5.7.1 for Windows using MSVC2013
来源:互联网 发布:淘宝卖家电话采集软件 编辑:程序博客网 时间:2024/05/17 08:46
Build a static Qt5.7.1 for Windows using MSVC2013
1. Download and extract Qt source code to this path, or you can use the source code from the online installer (in this case you have to choose to download source code during installation):
C:\Qt\Msvc\Src-5.7.1
2. Create folder C:\Qt\Msvc\Qt5.7.1_static
3. Go to C:\Qt\Msvc\Src-5.7.1\qtbase\mkspecs\common
and change msvc-desktop.conf like this (change all MD to MT to remove dependency on msvc dlls):Initial values:
QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
QMAKE_CFLAGS_DEBUG = -Zi -MDd
Should be changed to:
QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
QMAKE_CFLAGS_DEBUG = -Zi -MTd
4. Using MSVC2013 Developer Command Line tools, running as admin, Configure using following command:
(first change directory to here using “cd” command : C:\Qt\Msvc\Src-5.7.1)
Configure:
configure.bat -static -debug-and-release -opensource -prefix "C:\Qt\Msvc\Qt5.7.1_static" -c++std c++11 -mp -qt-sql-sqlite -plugin-sql-sqlite -opengl es2 -opengl desktop -platform win32-msvc2013 -qt-zlib -qt-libjpeg -qt-libpng -qt-sql-odbc -dbus-linked -dbus-runtime -no-qml-debug -qt-style-windows -qt-style-fusion -nomake examples -make libs -make tools -qt-pcre
(Notice that the parameter -platform win32-msvc2013 should be set according to the compiler you are using)
(Also note that you can add or remove parts and pieces of the libraries you are building by adding or removing parameters above, for example I always use ODBC so I add -qt-sql-odbc parameter but you might want to remove it if you don't need it.)
5. Run nmake (or JOM if you have it -- jom -j 4)
6. run nmake install (jom install -j 4)
0 0
- Build a static Qt5.7.1 for Windows using MSVC2013
- Qt5.6.0(msvc2013) QXmlStreamReader解析应用实例
- qt5.6(msvc2013)+opencv配置
- Build a Python IDE for Windows with Notepad++ and IPython
- Using a batch file to automatically build a Windows CE 5.0 and 6.0 project
- Windows Dev Intro - Using a Capture Device for Media Foundation
- RabbitMQ build for windows
- Using MySQL in Qt5.7 on Windows
- Using Eclipse with PyDev to build a Python development environment on Windows platform
- Build Web Apps for iPhone using Dashcode
- Creating a Chm build using Sandcastle
- how to build a codec using lib
- Quick build a ssh project using maven
- Qt5.4(MSVC2013 64位)+OpenCV2.4.10配置
- QT5 MSVC2013数据库SQLserver操作中文显示乱码问题
- Build caffe using qmake (ubuntu&windows)
- Using a static library in Xcode
- How to build zlib 1.2.3 using Visual Studio 2008 for 32-bit and 64-bit Windows
- XML Schema
- 基于51单片机和蓝牙控制的红外小车
- jersey get put delete post的用法及客户端如何调用
- [Mapbox GL]添加一个视频
- 视频传输设备的特点与技术构成
- Build a static Qt5.7.1 for Windows using MSVC2013
- mybatis系列-XML 映射配置文件(二)
- 在Linux系统中,用vim编写shell脚本文件时,在一块代码前快速加#号注释
- Behavior designer 英文解释
- Android6.0 WMS(五) WMS计算Activity窗口大小的过程分析(一)应用进程
- LeetCode187—Repeated DNA Sequences
- MySQL 5.6 解压版 安装
- webMethods Publishing delayed while outbound store is draining
- 39个让你受益的HTML5教程