使用 VC9 (2008) 和 VC10 (2010) 编译我自己的 php 扩展后,使用以下步骤:
http://blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/
初始化 php 时出现下一个错误:
PHP Warning: PHP Startup: FirstPHPExt Module: Unable to initialize module
Module compiled with build ID=API20090626,TS
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
in Unknown on line 0
为什么它不说我用 VC9 编译了模块?
更多信息:
操作系统:Windows7 x64 PHP: 5.3.3,TS,VC9
最佳答案
好的,我找到了解决方案:
您必须在 php-src/Zend/zend_build.h 中添加一个预处理器常量:
#define PHP_COMPILER_ID "VC9"
它会起作用。
关于php - 使用 Visual Studio 2008 编译 php 扩展,MODULE ID 与 php 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3641751/