WAMP环境下(apache2.2.21+Php5.3.10)编写PHP扩展

主要遇到的问题: 1,版本问题:VC9与VC6的问题 具体表现为:
Warning
PHP Startup: MeineExtension: Unable to initialize module
Module compiled with build ID=API20090626,TS
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
解决方法:下载正确的php版本,用正确的编译器 php.net官方说:

If you are using PHP with IIS you should use the VC9 versions of PHP VC6 Versions are compiled with the legacy Visual Studio 6 compiler

所以如果你用apache+php的话,应该用vc6的版本;但如果你想用vc9的版本,像我用了php5.3.10,就要用vc9的IDE,如VS2008,VS2010, 另外,在文件头还要加上一句宏:
#define PHP_COMPILER_ID "VC9"
这个问题纠结了我很久!希望对你有用.. 2,编译问题: 编译中可能会出现 php_stream_transport.h 报错,加上这句话 typedef int socklen_t; 另外,该导入的库都得导入。

转载于:https://my.oschina.net/ifeixiang/blog/339393

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值