<?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>
	「VS2015 给Console 程序加上图标的方法」的评论	</title>
	<atom:link href="https://www.lab-z.com/vsconic/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lab-z.com/vsconic/</link>
	<description></description>
	<lastBuildDate>Thu, 28 Jul 2022 12:55:18 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>
		评论者：Krishna		</title>
		<link>https://www.lab-z.com/vsconic/#comment-297645</link>

		<dc:creator><![CDATA[Krishna]]></dc:creator>
		<pubDate>Thu, 28 Jul 2022 12:55:18 +0000</pubDate>
		<guid isPermaLink="false">https://www.lab-z.com/?p=9058#comment-297645</guid>

					<description><![CDATA[之前我也研究过这个问题，我是这样总结的：
1，file.c 文件，可以include 其它 code文件，然后可以编译成binary(obj或者exe)，
等价于,
2，file.rc文件，可以include其它resource(image、string等等)，然后可以编译成binary(obj)。

因此1和2是类似的原理，可以结合编译的，举个例子。
1，准备一个hello.c文件，其内容如下：
      #include 
      int main(){ printf(&quot;hello\n&quot;); return 0; }
2，准备一个图标文件myicon.ico。
3，准备一个myicon.rc文件，其内容如下：
      IDI_ICON1 ICON myicon.ico
4，将myicon.rc编译成myicon.obj，使用的命令是: windres myicon.rc -O coff -o myicon.obj
5，结合hello.c编译出可执行文件，使用的命令是: gcc hello.c myicon.obj -o hello
      这样编译出的hello.exe带有文件图标。

备注: 这里使用的编译器工具链是Mingw64。

谢谢。]]></description>
			<content:encoded><![CDATA[<p>之前我也研究过这个问题，我是这样总结的：<br />
1，file.c 文件，可以include 其它 code文件，然后可以编译成binary(obj或者exe)，<br />
等价于,<br />
2，file.rc文件，可以include其它resource(image、string等等)，然后可以编译成binary(obj)。</p>
<p>因此1和2是类似的原理，可以结合编译的，举个例子。<br />
1，准备一个hello.c文件，其内容如下：<br />
      #include<br />
      int main(){ printf(&#8220;hello\n&#8221;); return 0; }<br />
2，准备一个图标文件myicon.ico。<br />
3，准备一个myicon.rc文件，其内容如下：<br />
      IDI_ICON1 ICON myicon.ico<br />
4，将myicon.rc编译成myicon.obj，使用的命令是: windres myicon.rc -O coff -o myicon.obj<br />
5，结合hello.c编译出可执行文件，使用的命令是: gcc hello.c myicon.obj -o hello<br />
      这样编译出的hello.exe带有文件图标。</p>
<p>备注: 这里使用的编译器工具链是Mingw64。</p>
<p>谢谢。</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
