<?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: Zend API：深入 PHP 内核 （七）开始创建扩展</title> <atom:link href="http://yanbin.org/archive/php-manual-zh-creating-extensions.html/feed" rel="self" type="application/rss+xml" /><link>http://yanbin.org/archive/php-manual-zh-creating-extensions.html</link> <description>人虽不能要他想要的，但能做他想做的</description> <lastBuildDate>Sat, 12 May 2012 00:10:13 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>By: allen</title><link>http://yanbin.org/archive/php-manual-zh-creating-extensions.html/comment-page-1#comment-18807</link> <dc:creator>allen</dc:creator> <pubDate>Sun, 06 May 2012 05:49:11 +0000</pubDate> <guid isPermaLink="false">http://www.yAnbiN.org/2006/08/31/php_manual_zh_creating_extensions/#comment-18807</guid> <description>hi hshqcn: _executor_globals_id问题是由于php生成脚本出现的问题。 将预编译中的LIBZEND_EXPORTS去掉，即可解决该问题！</description> <content:encoded><![CDATA[<p>hi hshqcn:<br /> _executor_globals_id问题是由于php生成脚本出现的问题。<br /> 将预编译中的LIBZEND_EXPORTS去掉，即可解决该问题！</p> ]]></content:encoded> </item> <item><title>By: hshqcn</title><link>http://yanbin.org/archive/php-manual-zh-creating-extensions.html/comment-page-1#comment-1199</link> <dc:creator>hshqcn</dc:creator> <pubDate>Mon, 24 Dec 2007 06:07:26 +0000</pubDate> <guid isPermaLink="false">http://www.yAnbiN.org/2006/08/31/php_manual_zh_creating_extensions/#comment-1199</guid> <description>在此请教个问题： 我要在php v5.2.3中做个扩展，服务器是linux，我们开发用的是windows，所以要编译2个版本。 我在linux平台写的代码，后来放在windows中用vc6编译，输出如下： Compiling... zzz.c Linking... Creating library Release_TS/php_zzz.lib and object Release_TS/php_zzz.exp zzz.obj : error LNK2001: unresolved external symbol _executor_globals_id zzz.obj : error LNK2001: unresolved external symbol _zend_getenv Release_TS/php_zzz.dll : fatal error LNK1120: 2 unresolved externals 执行 link.exe 时出错.php_zzz.dll - 1 error(s), 0 warning(s)zend_getenv函数的原型声明不带下划线，php5ts.lib中的版本也是不带的，问题解决了，方法是在头文件中加入 BEGIN_EXTERN_C() ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC); END_EXTERN_C()但是zend_parse_parameters函数在php5ts.lib中就有带下划线的版本，联想命名方式，感觉蛮混乱的；但是_executor_globals_id的问题一直无法解决，为什么命名约定在这里不可改变？如何解决呢？</description> <content:encoded><![CDATA[<p>在此请教个问题：<br /> 我要在php v5.2.3中做个扩展，服务器是linux，我们开发用的是windows，所以要编译2个版本。<br /> 我在linux平台写的代码，后来放在windows中用vc6编译，输出如下：<br /> Compiling&#8230;<br /> zzz.c<br /> Linking&#8230;<br /> Creating library Release_TS/php_zzz.lib and object Release_TS/php_zzz.exp<br /> zzz.obj : error LNK2001: unresolved external symbol _executor_globals_id<br /> zzz.obj : error LNK2001: unresolved external symbol _zend_getenv<br /> Release_TS/php_zzz.dll : fatal error LNK1120: 2 unresolved externals<br /> 执行 link.exe 时出错.</p><p>php_zzz.dll &#8211; 1 error(s), 0 warning(s)</p><p>zend_getenv函数的原型声明不带下划线，php5ts.lib中的版本也是不带的，问题解决了，方法是在头文件中加入<br /> BEGIN_EXTERN_C()<br /> ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);<br /> END_EXTERN_C()</p><p>但是zend_parse_parameters函数在php5ts.lib中就有带下划线的版本，联想命名方式，感觉蛮混乱的；</p><p>但是_executor_globals_id的问题一直无法解决，为什么命名约定在这里不可改变？如何解决呢？</p> ]]></content:encoded> </item> <item><title>By: yAnbiN</title><link>http://yanbin.org/archive/php-manual-zh-creating-extensions.html/comment-page-1#comment-1148</link> <dc:creator>yAnbiN</dc:creator> <pubDate>Sun, 16 Dec 2007 13:53:03 +0000</pubDate> <guid isPermaLink="false">http://www.yAnbiN.org/2006/08/31/php_manual_zh_creating_extensions/#comment-1148</guid> <description>俺审稿不仔细，多谢指正，已经修正～</description> <content:encoded><![CDATA[<p>俺审稿不仔细，多谢指正，已经修正～</p> ]]></content:encoded> </item> <item><title>By: hshqcn</title><link>http://yanbin.org/archive/php-manual-zh-creating-extensions.html/comment-page-1#comment-1131</link> <dc:creator>hshqcn</dc:creator> <pubDate>Thu, 13 Dec 2007 07:54:34 +0000</pubDate> <guid isPermaLink="false">http://www.yAnbiN.org/2006/08/31/php_manual_zh_creating_extensions/#comment-1131</guid> <description>根据first_module的代码，“编译”步骤的命令行应该是cc -fpic -DCOMPILE_DL_FIRST_MODULE=1 -I...， 否则得不到.so文件，我在这儿困扰了一段时间。。。</description> <content:encoded><![CDATA[<p>根据first_module的代码，“编译”步骤的命令行应该是cc -fpic -DCOMPILE_DL_FIRST_MODULE=1 -I&#8230;，<br /> 否则得不到.so文件，我在这儿困扰了一段时间。。。</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 3/9 queries in 0.002 seconds using apc
Object Caching 256/256 objects using apc
Content Delivery Network via N/A

Served from: yanbin.org @ 2012-05-19 01:01:35 -->
