惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - lansh

Boot 44b0x by uboot lxvoip Remove "Click here to enable Instant Search" - lansh Sipdroid Error “Registration failed (404 not found)” - lansh VoIP使用总结 Test 如何压缩word2007文档的图片? - lansh 通过Word 2007发布Blog - lansh - 博客园 vi的复制粘贴命令 UT斯达康 G680手机那些事儿 有些确实牛擦的有点嚣张!!! (zz) You may receive an "Access Denied" or a "Permission Denied" scripting error message when you browse a secure Web site that contains multiple frames - lansh CMake,如何将临时文件产生到一个特定的目录里面 来个7.0的破解截图,和6.0的过程完全一样,花了不到1个小时搞定。 终于把著名的背单词软件给破了 如何去除《谷歌金山词霸 1.95》软件内的广告,来加速启动。 关于翻译软件 上班中午 测试一下子
如何静态编译QT (zz)
lansh · 2010-02-03 · via 博客园 - lansh

静态编译QT涉及到两个方面:

1.静态编译QT,使程序可以将静态库的形式使用QT,这个好办,在configure.exe 程序的参数下,给上-static参数即可。

2.QT使用了VC的链接库也要静态链接。这个就有点难办了,因为QT默认的使用方式是动态的,不过,有了前人的研究就好办了,打开<qt-

install-dir>\mkspecs\win32-msvc2008\qmake.conf文件(VS2008,如果是VC6,则是<qt-install-dir>\mkspecs\win32-msvc\qmake.conf,

VS2003:<qt-install-dir>\mkspecs\win32-msvc.net\qmake.conf,相信现在没有人用VS2002吧),将下面两行:

QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd

改为:

QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_DEBUG = -Zi -MTd

就好了。这是VS2008的示例,如果你是其他版本的VS,则会有些区别,但只要将MD(动态)改为MT(静态),将MDD(动态调试)改为MTD(静

态调试),就好了。

如果你有多个版本的VS安装在系统上,则在configure.exe的命令行参数给上-platform win32-msvc2008,就可以使用VS2008编译了,其他的VS

版本可以在README中找到:

  win32-g++
  win32-icc (commercial edition only)
  win32-msvc (commercial edition only)
  win32-msvc.net (commercial edition only)
  win32-msvc2005 (commercial edition only)

改好了,就可以用 configure -platform win32-msvc2008 -debug-and-release -static -fast -qt-sql-sqlite 来配置系统了。

配置完成后,nmake编译之。

关于configure更详细的参数信息,请使用 configure --help查看。