<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shiyu Tang的财经博客 &#187; 开发</title>
	<atom:link href="http://www.shiyutang.com/category/%e5%bc%80%e5%8f%91/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shiyutang.com</link>
	<description>有关我的投资、生活以及爱好</description>
	<lastBuildDate>Sun, 11 Dec 2011 07:41:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>在Windows XP下用GCC 4.3.2编译Qt 4.4.3实战</title>
		<link>http://www.shiyutang.com/2008/10/15/%e5%9c%a8windows-xp%e4%b8%8b%e7%94%a8gcc-432%e7%bc%96%e8%af%91qt-443%e5%ae%9e%e6%88%98/</link>
		<comments>http://www.shiyutang.com/2008/10/15/%e5%9c%a8windows-xp%e4%b8%8b%e7%94%a8gcc-432%e7%bc%96%e8%af%91qt-443%e5%ae%9e%e6%88%98/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 05:19:55 +0000</pubDate>
		<dc:creator>Shiyu Tang</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://www.shiyutang.com/2008/10/15/%e5%9c%a8windows-xp%e4%b8%8b%e7%94%a8gcc-432%e7%bc%96%e8%af%91qt-443%e5%ae%9e%e6%88%98/</guid>
		<description><![CDATA[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 &#8220;C&#8221; { __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 &#8220;C&#8221; { __declspec(dllimport) long __stdcall InterlockedCompareExchange(volatile long [...]]]></description>
			<content:encoded><![CDATA[<p>1.下载GCC 4.3.2和工具包的编译版，在这里：<a href="http://www.tdragon.net/recentgcc/" target="_blank">http://www.tdragon.net/recentgcc/</a> 点“TDM/MinGW Installer 1.808.3”下载，并且安装好；</p>
<p>2.下载Qt 4.4.3。去这里下载：<a href="ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.4.3-mingw.exe" target="_blank">ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.4.3-mingw.exe</a> 完成后安装。注意选了MinGW编译器位置之后安装程序会报错，不用管它，确定安装即可；</p>
<p>3.在环境变量的PATH中增加你的MinGW\bin和Qt\4.4.3\bin的详细位置；</p>
<p>4.Qt 4.4.3可能有些小bug，编译时会报错，所以需要修改以下一些文件：</p>
<p>(1) Qt\4.4.3\src\corelib\arch\qatomic_windows.h：找到第386-392行，应该是这样的：<br />
extern &#8220;C&#8221; {<br />
__declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);<br />
__declspec(dllimport) long __stdcall InterlockedIncrement(long *);<br />
__declspec(dllimport) long __stdcall InterlockedDecrement(long *);<br />
__declspec(dllimport) long __stdcall InterlockedExchange(long *, long);<br />
__declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);<br />
}<br />
请改成这样：<br />
extern &#8220;C&#8221; {<br />
__declspec(dllimport) long __stdcall InterlockedCompareExchange(volatile long *, long, long);<br />
__declspec(dllimport) long __stdcall InterlockedIncrement(volatile long *);<br />
__declspec(dllimport) long __stdcall InterlockedDecrement(volatile long *);<br />
__declspec(dllimport) long __stdcall InterlockedExchange(volatile long *, long);<br />
__declspec(dllimport) long __stdcall InterlockedExchangeAdd(volatile long *, long);<br />
}</p>
<p>(2) Qt\4.4.3\src\corelib\io\qfsfileengine_win.cpp：找到第67-68行，应该是这样的：<br />
#define SECURITY_WIN32<br />
#include &lt;security.h&gt;<br />
请在这两行中间加上一行：#include &lt;subauth.h&gt;，使其像这样：<br />
#define SECURITY_WIN32<br />
#include &lt;subauth.h&gt;<br />
#include &lt;security.h&gt;</p>
<p>(3) Qt\4.4.3\src\gui\inputmethod\qwininputcontext_win.cpp，找到第500行，应该是这样：<br />
bool QWinInputContext::endComposition()<br />
请在这行前面加上一行extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);，使其像这样：<br />
extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);<br />
bool QWinInputContext::endComposition()</p>
<p>5.OK， 现在应该可以编译了。点开始菜单中的“Qt by Nokia v4.4.3 (OpenSource)”-&gt;“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。</p>
<p>6.好了。请享用GCC 4.3.2和Qt 4.4.3带给你的快乐吧。</p>
<p>请有空来我的网站看看啦：<a href="http://www.shiyutang.com//" target="_blank">http://www.shiyutang.com</a>。转载时请注明作者是shiyutang，并且包含我的个人网站地址 <a href="http://www.shiyutang.com//" target="_blank">http://www.shiyutang.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiyutang.com/2008/10/15/%e5%9c%a8windows-xp%e4%b8%8b%e7%94%a8gcc-432%e7%bc%96%e8%af%91qt-443%e5%ae%9e%e6%88%98/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Simple Guide to Let Win32 libcurl and Perl WWW::Curl Work Together</title>
		<link>http://www.shiyutang.com/2008/07/04/a-simple-guide-to-let-win32-libcurl-and-perl-wwwcurl-work-together/</link>
		<comments>http://www.shiyutang.com/2008/07/04/a-simple-guide-to-let-win32-libcurl-and-perl-wwwcurl-work-together/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 16:59:33 +0000</pubDate>
		<dc:creator>Shiyu Tang</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.shiyutang.com/2008/07/04/a-simple-guide-to-let-win32-libcurl-and-perl-wwwcurl-work-together/</guid>
		<description><![CDATA[After several hours&#8217; work, I have finally found out how to make a compiled libcurl downloaded from cURL website and the perl module WWW::Curl work together. I hope it would be useful for you. I have already installed MinGW and ActiveState Perl 5.10. Not everyone likes to compile libcurl. It is very boring and time [...]]]></description>
			<content:encoded><![CDATA[<p>After several hours&#8217; work, I have finally found out how to make a compiled libcurl downloaded from cURL website and the perl module WWW::Curl work together. I hope it would be useful for you. I have already installed MinGW and ActiveState Perl 5.10.</p>
<p>Not everyone likes to compile libcurl. It is very boring and time comsuming. Using a compiled libcurl can save some time. So I downloaded Win32 Generic libcurl compiled by Günter Knauf from <a href="http://curl.haxx.se/download.html" target="_blank">http://curl.haxx.se/download.html</a> . The link is <a href="http://www.gknw.net/mirror/curl/win32/curl-7.18.2-devel-mingw32.zip" target="_blank">http://www.gknw.net/mirror/curl/win32/curl-7.18.2-devel-mingw32.zip</a> . I guess it is compiled by MinGW.</p>
<p>If you try to perl Makefile.PL and make, of course it would fail. So I change something in Makefile.PL.</p>
<p>1. Comment &#8220;<code>requires_external_bin       'curl-config'</code>&#8220;, that means add a &#8220;#&#8221;<br />
before the line;<br />
2. Comment <code>/usr/include</code>, <code>/usr/local/curl/include</code>, <code>/usr/local/include/curl</code>, <code>../../include</code>, <code>../curl/include</code> in &#8220;<code>my @includes</code>&#8220;;<br />
3. Change &#8220;<code>C:\\INCLUDE\\CURL</code>&#8221; in &#8220;<code>my @includes</code>&#8221; to the directory like &#8220;<code>E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32\\include</code>&#8220;. <code>E:\\Perldev\\downloader</code> is the directory where you decompress the curl-7.18.2-devel-mingw32.zip to;<br />
4. Comment &#8220;<code>my $cflags = `curl-config --cflags`</code>&#8220;, &#8220;<code>my $lflags = `curl-config --libs`</code>&#8220;, &#8220;<code>my $libcurl_version = `curl-config --version`</code>&#8221; and &#8220;<code>print "version is $libcurl_version"</code>&#8220;;<br />
5. Add these lines to the place where step 4 does:</p>
<pre>my $cflags = '-I"E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32\\include"';
my $ldflags = '-L"E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32\\lib"';
my $lflags = '-lcurl -lcurldll';</pre>
<p>6. Comment these lines:</p>
<pre>if (!defined($lflags)) {
$lflags="-lcurl";
# Windows version of libcurl - not widely tested, feedback welcome!
if ($^O eq 'MSWin32') {
foreach my $try (@includes) {
if (-f $try . '\lib\libcurl_imp.lib') {
$lflags = $try . '\lib\libcurl_imp.lib' unless(-f $lflags);
last;
}
}
$lflags="libcurl.lib" unless ($lflags);
}
print "Guessing your linker flags as: $lflags\n";
}</pre>
<p>7. At the end of this file, please change &#8220;<code>'LIBS'         =>$lflags</code>&#8221;<br />
to &#8220;<code>'LIBS'         =>"$ldflags $lflags"</code>&#8220;;<br />
8. Save the file;<br />
9. perl Makefile.PL;<br />
10. nmake (you need nmake from Mircosoft, which can be downloaded from<br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084</a> );<br />
11. nmake install.</p>
<p>OK, it&#8217;s done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiyutang.com/2008/07/04/a-simple-guide-to-let-win32-libcurl-and-perl-wwwcurl-work-together/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在Perl中使用UTF-8编码查询MySQL数据库</title>
		<link>http://www.shiyutang.com/2008/06/18/%e5%9c%a8perl%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81%e6%9f%a5%e8%af%a2mysql%e6%95%b0%e6%8d%ae%e5%ba%93/</link>
		<comments>http://www.shiyutang.com/2008/06/18/%e5%9c%a8perl%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81%e6%9f%a5%e8%af%a2mysql%e6%95%b0%e6%8d%ae%e5%ba%93/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:45:06 +0000</pubDate>
		<dc:creator>Shiyu Tang</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://www.shiyutang.com/2008/06/18/%e5%9c%a8perl%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81%e6%9f%a5%e8%af%a2mysql%e6%95%b0%e6%8d%ae%e5%ba%93/</guid>
		<description><![CDATA[Perl里提供了DBI这个模块来连接MySQL数据库，使得查询MySQL数据库特别方便。不过，很多人发现，如果MySQL数据库的某些表中使用了UTF-8编码，那查询的结果就成了“？”，为此不得不采用GB2312这样的编码。实际上，这个问题解决起来也很简单，就是在连接字段里面加上{&#8216;mysql_enable_utf8&#8242;=&#62;1}即可。例如下面的一小段示范代码： use DBI; use warnings; use strict; use utf8; use bytes; my $dbh = DBI-&#62;connect("DBI:mysql:database=yourdatabase;host=yourhost", "username", "password", {'RaiseError'=&#62;1, 'mysql_enable_utf8'=&#62;1}) &#124;&#124; die "Cannot connect to database:".DBI-&#62;errstr; my $sth=$dbh-&#62;prepare('SELECT * FROM onetable'); $sth-&#62;execute()&#124;&#124;die "An error occurs while querying: ".$sth-&#62;errstr; while(my @data=$sth-&#62;fetchrow_array()){ for my $i(0..$#data) { print "$data[$i]\\t"; } print "\\n"; } $dbh-&#62;disconnect();]]></description>
			<content:encoded><![CDATA[<p>Perl里提供了DBI这个模块来连接MySQL数据库，使得查询MySQL数据库特别方便。不过，很多人发现，如果MySQL数据库的某些表中使用了UTF-8编码，那查询的结果就成了“？”，为此不得不采用GB2312这样的编码。实际上，这个问题解决起来也很简单，就是在连接字段里面加上{&#8216;mysql_enable_utf8&#8242;=&gt;1}即可。例如下面的一小段示范代码：</p>
<pre>
use DBI;
use warnings;
use strict;
use utf8;
use bytes;

my $dbh = DBI-&gt;connect("DBI:mysql:database=yourdatabase;host=yourhost",
			"username", "password",
			{'RaiseError'=&gt;1, 'mysql_enable_utf8'=&gt;1})
			|| die "Cannot connect to database:".DBI-&gt;errstr;
my $sth=$dbh-&gt;prepare('SELECT * FROM onetable');
$sth-&gt;execute()||die "An error occurs while querying: ".$sth-&gt;errstr;
while(my @data=$sth-&gt;fetchrow_array()){
	for my $i(0..$#data) {
		print "$data[$i]\\t";
	}
	print "\\n";
}
$dbh-&gt;disconnect();</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.shiyutang.com/2008/06/18/%e5%9c%a8perl%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81%e6%9f%a5%e8%af%a2mysql%e6%95%b0%e6%8d%ae%e5%ba%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Perl的Mason模块中使用UTF-8编码</title>
		<link>http://www.shiyutang.com/2008/06/16/%e5%9c%a8perl%e7%9a%84mason%e6%a8%a1%e5%9d%97%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81/</link>
		<comments>http://www.shiyutang.com/2008/06/16/%e5%9c%a8perl%e7%9a%84mason%e6%a8%a1%e5%9d%97%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 12:20:30 +0000</pubDate>
		<dc:creator>Shiyu Tang</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[Mason]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://www.shiyutang.com/2008/06/16/%e5%9c%a8perl%e7%9a%84mason%e6%a8%a1%e5%9d%97%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81/</guid>
		<description><![CDATA[使用Perl做网站的人都喜欢用Mason，因为它可以使Perl像PHP那样，而不是print一大堆html标签。不过默认情况下，它使用UTF-8编码时，输出的网页是乱码。其实这个问题解决起来也很简单，就是在你的网页的最前面加上一行： % $r-&#62;content_type('text/html; charset=UTF-8'); 就可以了。 例如这是个最简单的index.html文件： % $r-&#62;content_type('text/html; charset=UTF-8'); % my $planet = "世界"; 你好，&#60;% $planet %&#62;！]]></description>
			<content:encoded><![CDATA[<p>使用Perl做网站的人都喜欢用Mason，因为它可以使Perl像PHP那样，而不是print一大堆html标签。不过默认情况下，它使用UTF-8编码时，输出的网页是乱码。其实这个问题解决起来也很简单，就是在你的网页的最前面加上一行：</p>
<pre>% $r-&gt;content_type('text/html; charset=UTF-8');</pre>
<p>就可以了。</p>
<p>例如这是个最简单的index.html文件：<br />
<code>% $r-&gt;content_type('text/html; charset=UTF-8');<br />
% my $planet = "世界";<br />
你好，&lt;% $planet %&gt;！</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiyutang.com/2008/06/16/%e5%9c%a8perl%e7%9a%84mason%e6%a8%a1%e5%9d%97%e4%b8%ad%e4%bd%bf%e7%94%a8utf-8%e7%bc%96%e7%a0%81/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在Windows XP中安装MinGW、Qt4和Eclipse Integration的指南</title>
		<link>http://www.shiyutang.com/2008/05/03/%e5%9c%a8windows-xp%e4%b8%ad%e5%ae%89%e8%a3%85mingw%e3%80%81qt4%e5%92%8ceclipse-integration%e7%9a%84%e6%8c%87%e5%8d%97/</link>
		<comments>http://www.shiyutang.com/2008/05/03/%e5%9c%a8windows-xp%e4%b8%ad%e5%ae%89%e8%a3%85mingw%e3%80%81qt4%e5%92%8ceclipse-integration%e7%9a%84%e6%8c%87%e5%8d%97/#comments</comments>
		<pubDate>Fri, 02 May 2008 17:05:02 +0000</pubDate>
		<dc:creator>Shiyu Tang</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MinGW]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://www.shiyutang.com/2008/05/03/%e5%9c%a8windows-xp%e4%b8%ad%e5%ae%89%e8%a3%85mingw%e3%80%81qt4%e5%92%8ceclipse-integration%e7%9a%84%e6%8c%87%e5%8d%97/</guid>
		<description><![CDATA[在Windows XP中安装MinGW、Qt4和Eclipse Integration花了我不少时间。我遇到了一些问题，而且我发现也有很多其他人也遇到了，比如Build Debug Libraries不能编译、&#8221;mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1&#8243;，等等，所以我写了这篇指南，希望能让大家省一些时间。 1. 下载&#8221;Automated MinGW Installer&#8221; (http://sourceforge.net/project/showfiles.php?group_id=2435)，安装它。注意选上g++和mingw32-make； 2. 下载&#8221;GNU Source-Level Debugger&#8221; (http://sourceforge.net/project/showfiles.php?group_id=2435)，把它解压缩到您安装MinGW的地方。当解压软件你是不是覆盖同名文件时，一律选“否”； 3. 下载&#8221;Qt/Windows Open Source Edition&#8221; (http://trolltech.com/developer/downloads/qt/windows)。安装它； 4. 下载&#8221;Eclipse IDE for C/C++ Developers&#8221; (http://www.eclipse.org/downloads/)，把它解压缩到某个文件夹去。如果你已经有开发Java的Eclipse了，可以只安装cdt插件； 5. 下载&#8221;Qt Eclipse Integration Downloads&#8221; (http://trolltech.com/developer/downloads/qt/eclipse-integration-download)，安装它； 6. 设置系统的环境变量。这一步很重要。如果有什么地方没有正确完成的话，以后可能出现不少问题。E:\Develop是我安装MinGW的Qt地方。 把E:\Develop\MinGW\bin、E:\Develop\Qt\4.3.4\bin和E:\Develop\Qt\4.3.4\lib添加到Path； 把E:\Develop\MinGW\lib和E:\Develop\Qt\4.3.4\lib添加到Lib (如果没有Lib，请创建一个)； 把E:\Develop\MinGW\include和E:\Develop\Qt\4.3.4\include添加到Include (如果没有Include，请创建一个)； 重新启动计算机； 7. 在开始菜单\所有程序\Qt by Trolltech v4.3.4 (OpenSource)里，找到Qt 4.3.4 (Build Debug [...]]]></description>
			<content:encoded><![CDATA[<p>在Windows XP中安装MinGW、Qt4和Eclipse Integration花了我不少时间。我遇到了一些问题，而且我发现也有很多其他人也遇到了，比如Build Debug Libraries不能编译、&#8221;mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1&#8243;，等等，所以我写了这篇指南，希望能让大家省一些时间。</p>
<p>1. 下载&#8221;Automated MinGW Installer&#8221; (<a href="http://sourceforge.net/project/showfiles.php?group_id=2435" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=2435</a>)，安装它。注意选上g++和mingw32-make；<br />
2. 下载&#8221;GNU Source-Level Debugger&#8221; (<a href="http://sourceforge.net/project/showfiles.php?group_id=2435" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=2435</a>)，把它解压缩到您安装MinGW的地方。当解压软件你是不是覆盖同名文件时，一律选“否”；<br />
3. 下载&#8221;Qt/Windows Open Source Edition&#8221; (<a href="http://trolltech.com/developer/downloads/qt/windows" target="_blank">http://trolltech.com/developer/downloads/qt/windows</a>)。安装它；<br />
4. 下载&#8221;Eclipse IDE for C/C++ Developers&#8221; (<a href="http://www.eclipse.org/downloads/" target="_blank">http://www.eclipse.org/downloads/</a>)，把它解压缩到某个文件夹去。如果你已经有开发Java的Eclipse了，可以只安装cdt插件；<br />
5. 下载&#8221;Qt Eclipse Integration Downloads&#8221; (<a href="http://trolltech.com/developer/downloads/qt/eclipse-integration-download" target="_blank">http://trolltech.com/developer/downloads/qt/eclipse-integration-download</a>)，安装它；<br />
6. 设置系统的环境变量。这一步很重要。如果有什么地方没有正确完成的话，以后可能出现不少问题。E:\Develop是我安装MinGW的Qt地方。<br />
把E:\Develop\MinGW\bin、E:\Develop\Qt\4.3.4\bin和E:\Develop\Qt\4.3.4\lib添加到Path；<br />
把E:\Develop\MinGW\lib和E:\Develop\Qt\4.3.4\lib添加到Lib (如果没有Lib，请创建一个)；<br />
把E:\Develop\MinGW\include和E:\Develop\Qt\4.3.4\include添加到Include (如果没有Include，请创建一个)；<br />
重新启动计算机；<br />
7. 在开始菜单\所有程序\Qt by Trolltech v4.3.4 (OpenSource)里，找到Qt 4.3.4 (Build Debug Libraries)，然后执行它。注意这需要2个小时时间，并且安装MinGW的分区需要3GB的空间；<br />
8. 在Eclipse中编写一个Qt程序；<br />
9. 点击臭虫图标，选&#8221;Open Debug Dialog&#8230;&#8221;在C/C++ Local Application添加一个新的配置，注意C/C++ Application那一栏里应该是&#8221;debug/*.exe&#8221;，而不是&#8221;release/*.exe&#8221;！点Debug选项卡，再把Debugger选择为gdb/mi，现在你应该可以debug了；<br />
10. 终于完了。期望你不要再遇到这类问题。</p>
<p>注意，第6步非常重要。你必须在添加系统环境变量之后重启计算机。</p>
<p>我希望这份指南能帮助你。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shiyutang.com/2008/05/03/%e5%9c%a8windows-xp%e4%b8%ad%e5%ae%89%e8%a3%85mingw%e3%80%81qt4%e5%92%8ceclipse-integration%e7%9a%84%e6%8c%87%e5%8d%97/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

