<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 测试第一个linux下的hello world</title>
	<atom:link href="http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/feed/" rel="self" type="application/rss+xml" />
	<link>http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 04:25:21 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: wingfish</title>
		<link>http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/comment-page-1/#comment-5296</link>
		<dc:creator>wingfish</dc:creator>
		<pubDate>Sun, 16 Aug 2009 08:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/#comment-5296</guid>
		<description>谢谢高手指点，有一段时间没有用lazarus了，我找机会在ubuntu下再试试看。</description>
		<content:encoded><![CDATA[<p>谢谢高手指点，有一段时间没有用lazarus了，我找机会在ubuntu下再试试看。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Insion</title>
		<link>http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/comment-page-1/#comment-5295</link>
		<dc:creator>Insion</dc:creator>
		<pubDate>Sun, 16 Aug 2009 04:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://chuangyiji.com/2008/02/27/ce-shi-di-yi-ge-linux-xia-di-hello-world/#comment-5295</guid>
		<description>可惜我现在用mac，不然就帮你测试下。
另外，代码没有优化而且附带大量调试信息就会很大，在优化选项里选择优化等级2然后生成程序，再用lazarus本身附带的strip去掉生成的程序里所有调试信息和一些无关的内容就可以减肥到很小了。还可以继续用upx压缩。


下面是官方的说明
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

Why are the generated binaries so big?

The binaries are big because they include a lot of debug information necessary for using gdb (GNU Debugger).

The compiler has an option to remove the debug information from the executable (-Xs), but due to a bug in the compiler (version 2.0.2 and earlier), this doesn&#039;t work correctly. It has been fixed in version 2.0.4 and later of the compiler.

You can use a program called &quot;strip&quot; to remove the debug symbols from the executable file. It is located under lazarus dir lazarus\pp\bin\i386-win32\.

Just type &quot;strip --strip-all &quot; on the command line.

If you want to make your program even smaller, you should try UPX too. UPX is a very good exe compressor. It includes no memory overhead due to in-place decompression. It also has a very fast decompression (~10 MB/sec on an Pentium 133).

To use upx just type &quot;upx &quot; on the command line.

after using both strip and upx a simple GUI Lazarus program gets:

    * ~ 700kb on Linux
    * ~ 420kb on Windows 

A more detailed answer with the drawbacks of using UPX is given on Size Matters.

It&#039;s also important to note that the hello world lazarus software already includes a huge amount of features. It includes:

    * XML handling library
    * Image handling library for png, xpm, bmp and ico files
    * Almost all widgets from the Lazarus Component Library
    * All of the Free Pascal Runtime Library 

So it&#039;s very big, but it already includes almost everything a real world non-trivial app will need.

Lazarus executable size starts big, but grows very slowly, because of the Free Pascal compiler and the way lazarus forms operate. A c++ project (just an example, but applies to other languages / tools too) starts very small on the hello world, but quickly grows exponentially when you need features to write a non-trivial application.</description>
		<content:encoded><![CDATA[<p>可惜我现在用mac，不然就帮你测试下。<br />
另外，代码没有优化而且附带大量调试信息就会很大，在优化选项里选择优化等级2然后生成程序，再用lazarus本身附带的strip去掉生成的程序里所有调试信息和一些无关的内容就可以减肥到很小了。还可以继续用upx压缩。</p>
<p>下面是官方的说明<br />
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－</p>
<p>Why are the generated binaries so big?</p>
<p>The binaries are big because they include a lot of debug information necessary for using gdb (GNU Debugger).</p>
<p>The compiler has an option to remove the debug information from the executable (-Xs), but due to a bug in the compiler (version 2.0.2 and earlier), this doesn&#8217;t work correctly. It has been fixed in version 2.0.4 and later of the compiler.</p>
<p>You can use a program called &#8220;strip&#8221; to remove the debug symbols from the executable file. It is located under lazarus dir lazarus\pp\bin\i386-win32\.</p>
<p>Just type &#8220;strip &#8211;strip-all &#8221; on the command line.</p>
<p>If you want to make your program even smaller, you should try UPX too. UPX is a very good exe compressor. It includes no memory overhead due to in-place decompression. It also has a very fast decompression (~10 MB/sec on an Pentium 133).</p>
<p>To use upx just type &#8220;upx &#8221; on the command line.</p>
<p>after using both strip and upx a simple GUI Lazarus program gets:</p>
<p>    * ~ 700kb on Linux<br />
    * ~ 420kb on Windows </p>
<p>A more detailed answer with the drawbacks of using UPX is given on Size Matters.</p>
<p>It&#8217;s also important to note that the hello world lazarus software already includes a huge amount of features. It includes:</p>
<p>    * XML handling library<br />
    * Image handling library for png, xpm, bmp and ico files<br />
    * Almost all widgets from the Lazarus Component Library<br />
    * All of the Free Pascal Runtime Library </p>
<p>So it&#8217;s very big, but it already includes almost everything a real world non-trivial app will need.</p>
<p>Lazarus executable size starts big, but grows very slowly, because of the Free Pascal compiler and the way lazarus forms operate. A c++ project (just an example, but applies to other languages / tools too) starts very small on the hello world, but quickly grows exponentially when you need features to write a non-trivial application.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
