<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post/1025/</link>
<title><![CDATA[[转]用vc 2008编译php扩展]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[有感而发]]></category>
<pubDate>Tue, 30 Aug 2011 00:32:30 +0000</pubDate> 
<guid>https://atim.cn/post/1025/</guid> 
<description>
<![CDATA[ 
	今天又想试试写php扩展，先从编译sample开始。<br/><br/>首先用ext_skel_win32.php生成骨架代码。这个需要cygwin。如果cygwin不在c:&#92;cygwin，那么需要修改这个文件，指定cygwin的位置。比如：$cygwin_path = 'd:&#92;cygwin&#92;bin';<br/><br/>之后用vc2008打开生成的dsp工程文件，升级工程文件以后，把工程选项里的C/C++ -> Code Generation里的Runtime Library改成Multi-threaded DLL (/MD)；C/C++ -> Advanced里的Compile As设成Compile as C Code (/TC)。<br/><br/>然后就编译，居然就没通过有几个语法错误…… 搜索了一下，发现还要改两个地方：<br/><br/> Zend/Zend.h:<br/><br/>把#include <stdio.h>&nbsp;&nbsp;搬到<br/><div class="code"><br/>#ifdef ZEND_WIN32<br/># include &quot;zend_config.w32.h&quot;<br/># define ZEND_PATHS_SEPARATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;;&#039;<br/>#elif defined(NETWARE)<br/># include &lt;zend_config.h&gt;<br/># define ZEND_PATHS_SEPARATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;;&#039;<br/>#elif defined(__riscos__)<br/># include &lt;zend_config.h&gt;<br/># define ZEND_PATHS_SEPARATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;;&#039;<br/>#else<br/># include &lt;zend_config.h&gt;<br/># define ZEND_PATHS_SEPARATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;:&#039;<br/>#endif<br/></div><br/>后面去。<br/><br/>还要修改zend_config.w32.h，把#define vsnprintf _vsnprintf这行注释掉。<br/><br/>之后总算可以编译通过了。加载进来运行一下，终于看到了那句Congratulations。<br/><br/>以后再想想写个什么扩展好，然后进一步研究下。 <br/>[<a href="http://syre.blogbus.com/logs/12144402.html" target="_blank">源</a>]
]]>
</description>
</item><item>
<link>https://atim.cn/post/1025/#blogcomment4885</link>
<title><![CDATA[[评论] [转]用vc 2008编译php扩展]]></title> 
<author>128 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 02 Sep 2011 14:48:32 +0000</pubDate> 
<guid>https://atim.cn/post/1025/#blogcomment4885</guid> 
<description>
<![CDATA[ 
	你也开始做扩展了呀，还在中山吗？有空交流交流。<br/>qq:59.43.59.0<br/><br/>写过：json-schema-php和zoeeyguard，可以搜一搜。我在石岐。
]]>
</description>
</item>
</channel>
</rss>