使用Visual Studio 2008编译php扩展名,模块ID与php不匹配 [英] Compiling a php extension with Visual Studio 2008, MODULE ID don't match with php

查看:132
本文介绍了使用Visual Studio 2008编译php扩展名,模块ID与php不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用以下步骤使用VC9(2008)和VC10(2010)编译我自己的php扩展名之后:

After compiling my own php extension using VC9 (2008) and VC10 (2010) using the next steps:

http: //blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/

初始化php时出现下一个错误:

I get the next error when initializing 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 编译了模块?

Why it doesn't says that I compiled the module with VC9?

更多信息:

操作系统:Windows7 x64 PHP:5.3.3,TS,VC9

Operating System: Windows7 x64 PHP: 5.3.3,TS,VC9

推荐答案

好,我找到了解决方法:

Ok, I found the solution:

您必须将预处理器常量添加到 php-src/Zend/zend_build.h :

You must add a preprocessor constant into php-src/Zend/zend_build.h:

#define PHP_COMPILER_ID "VC9"

它将起作用.

在此处找到解决方案: http://forums.zend.com/viewtopic.php?f = 55& t = 2045

Solution found here: http://forums.zend.com/viewtopic.php?f=55&t=2045

这篇关于使用Visual Studio 2008编译php扩展名,模块ID与php不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆