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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
罗磊的独立博客
F
Fortinet All Blogs
T
Threatpost
Y
Y Combinator Blog
博客园_首页
美团技术团队
Security Latest
Security Latest
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
V
V2EX - 技术
The Cloudflare Blog
L
LINUX DO - 热门话题
博客园 - 司徒正美
Jina AI
Jina AI
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
The Hacker News
The Hacker News
P
Privacy International News Feed
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Latest news
Latest news
NISL@THU
NISL@THU
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
雷峰网
雷峰网
Application and Cybersecurity Blog
Application and Cybersecurity Blog
B
Blog RSS Feed
W
WeLiveSecurity
D
DataBreaches.Net
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
TaoSecurity Blog
TaoSecurity Blog
S
Securelist
Help Net Security
Help Net Security

博客园 - Jaypei

archlinux中启用sshd [转] AT89C52资料 VirtualBox中安装PuppyLinux4 [转]比较全的Vim 中的正则表达式 luacurl的一个获得html的函数 [转]使用Mac OS X系统必须了解的10条命令 [原]Qt4.5中Plugins使用方法 用nuSOAP传递对象数组的问题终于解决 粗心导致的gsoap一个错误 MinGW环境使用gSOAP rdesktop中剪切板共享 Ubuntu下安装Postgresql 8.3 [原创]关于python的Singleton [转]如何讀取文字檔? (C/C++) (STL) 简单的python读写windows剪切板 关于SOAPpy传递对象参数调用WebService的问题总结 LinkedServer的用法 解决Smarty中trancate使用UTF8时中文乱码问题 关于wxPython中多线程修改主界面 - Jaypei
[转]在Windows XP下用GCC 4.3.2编译Qt 4.4.3实战
Jaypei · 2009-03-04 · via 博客园 - Jaypei

2009-03-04 12:59  Jaypei  阅读(1463)  评论()    收藏  举报

1.下载GCC 4.3.2和工具包的编译版,在这里:http://www.tdragon.net/recentgcc/ 点“TDM/MinGW Installer 1.808.3”下载,并且安装好;

2.下载Qt 4.4.3。去这里下载:ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.4.3-mingw.exe 完成后安装。注意选了MinGW编译器位置之后安装程序会报错,不用管它,确定安装即可;

3.在环境变量的PATH中增加你的MinGW"bin和Qt"4.4.3"bin的详细位置;

4.Qt 4.4.3可能有些小bug,编译时会报错,所以需要修改以下一些文件:

(1) Qt"4.4.3"src"corelib"arch"qatomic_windows.h:找到第386-392行,应该是这样的:
extern "C" {
    __declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);
    __declspec(dllimport) long __stdcall InterlockedIncrement(long *);
    __declspec(dllimport) long __stdcall InterlockedDecrement(long *);
    __declspec(dllimport) long __stdcall InterlockedExchange(long *, long);
    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);
}
请改成这样:
extern "C" {
    __declspec(dllimport) long __stdcall InterlockedCompareExchange(volatile long *, long, long);
    __declspec(dllimport) long __stdcall InterlockedIncrement(volatile long *);
    __declspec(dllimport) long __stdcall InterlockedDecrement(volatile long *);
    __declspec(dllimport) long __stdcall InterlockedExchange(volatile long *, long);
    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(volatile long *, long);
}

(2) Qt"4.4.3"src"corelib"io"qfsfileengine_win.cpp:找到第67-68行,应该是这样的:
#define SECURITY_WIN32
#include <security.h>
请在这两行中间加上一行:#include <subauth.h>,使其像这样:
#define SECURITY_WIN32
#include <subauth.h>
#include <security.h>

(3) Qt"4.4.3"src"gui"inputmethod"qwininputcontext_win.cpp,找到第500行,应该是这样:
bool QWinInputContext::endComposition()
请在这行前面加上一行extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);,使其像这样:
extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);
bool QWinInputContext::endComposition()

5.OK, 现在应该可以编译了。点开始菜单中的“Qt by Nokia v4.4.3 (OpenSource)”->“Qt 4.4.3 Command Prompt”,然后输入“configure -debug-and-release -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg”回车进行configure,几分钟之后configure完成,再输入“mingw32-make”回车就可以编译了。编译可 能需要3个小时时间(我的电脑CPU是Intel Core Duo T7500的,内存是2G),大概需要4G空间。编译完成后,请输入“mingw32-make clean”清除中间文件,这样可以使占用空间减少到1.95G。

6.好了。请享用GCC 4.3.2和Qt 4.4.3带给你的快乐吧。

---

转载自:

shiyutang

http://www.shiyutang.com/