<?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>Tommy's Blog &#187; UCL</title>
	<atom:link href="http://tommy.net.cn/tag/ucl/feed/" rel="self" type="application/rss+xml" />
	<link>http://tommy.net.cn</link>
	<description>Tommy 的自留地</description>
	<lastBuildDate>Mon, 27 Dec 2010 08:57:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>用 VS2008 编译 ucl-1.03 的问题</title>
		<link>http://tommy.net.cn/2008/09/02/vs2008-vs-ucl-103/</link>
		<comments>http://tommy.net.cn/2008/09/02/vs2008-vs-ucl-103/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:56:34 +0000</pubDate>
		<dc:creator>Tommy</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[UCL]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://tommy.net.cn/?p=46</guid>
		<description><![CDATA[今天在用 VS2008 编译 SlOnline 的代码的时候，发现 ucl-1.03 的库不能编译了。用 OopsWare 已经编译好的版本就可以，自己编译就报错。提示的错误为 error C3163: '_vsnprintf': attributes inconsistent with previous declaration OopsWare 使用的版本是 VS2008 Express Edition，我用的是 VS2008 Team Edition。感觉问题就是出在这里了。因为之前我用 VS2005 编译的时候也没有类似的问题。 最后查资料，应该是宏定义所导致的问题。找到 ucl-1.03 里面的 acc/acc-auto.h 这个文件，将源代码中第 436 行的代码 # define vsnprintf _vsnprintf 修改为 #if (_MSC_VER &#60; 1500) # define vsnprintf _vsnprintf #endif 其中，_MSC_VER 表示 VC 编译器的版本号，1500 对应的是 VS2008。修改后，重新编译，问题解决！ 2008-09-07 [...]]]></description>
			<content:encoded><![CDATA[<p>今天在用 VS2008 编译 SlOnline 的代码的时候，发现 <a title="UCL data compression library" href="http://www.oberhumer.com/opensource/ucl/" target="_blank">ucl-1.03</a> 的库不能编译了。用 OopsWare 已经编译好的版本就可以，自己编译就报错。提示的错误为</p>
<p><code>error C3163: '_vsnprintf': attributes inconsistent with previous declaration</code></p>
<p>OopsWare 使用的版本是 VS2008 Express Edition，我用的是 VS2008 Team Edition。感觉问题就是出在这里了。因为之前我用 VS2005 编译的时候也没有类似的问题。</p>
<p>最后查资料，应该是宏定义所导致的问题。找到 ucl-1.03 里面的 <strong>acc/acc-auto.h</strong> 这个文件，将源代码中第 436 行的代码</p>
<p><code>#    define vsnprintf _vsnprintf</code></p>
<p>修改为</p>
<p><code>#if (_MSC_VER &lt; 1500)<br />
#    define vsnprintf _vsnprintf<br />
#endif<br />
</code></p>
<p>其中，_MSC_VER 表示 VC 编译器的版本号，1500 对应的是 VS2008。修改后，重新编译，问题解决！</p>
<p>2008-09-07 更新：</p>
<p>OopsWare 的 VC2008 Express 也有这个问题，不过他是通过修改 VC 自带的头文件来解决的</p>
]]></content:encoded>
			<wfw:commentRss>http://tommy.net.cn/2008/09/02/vs2008-vs-ucl-103/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

