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

来源:互联网 发布:mac u盘新建文件夹 编辑:程序博客网 时间:2024/05/14 04:56
主要遇到的问题:1,版本问题:VC9与VC6的问题具体表现为:
WarningPHP Startup: MeineExtension: Unable to initialize moduleModule compiled with build ID=API20090626,TSPHP compiled with build ID=API20090626,TS,VC9These options need to match
解决方法:下载正确的php版本,用正确的编译器php.net官方说:

If you are using PHP with IIS you should use the VC9 versions of PHPVC6 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; 另外,该导入的库都得导入。
原创粉丝点击