我最近重新编译了我的 php,突然旧代码(以及来自互联网的示例)停止编译。
This http://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-zend/确切的示例无法编译。
有问题的代码片段:
static function_entry hello_functions[] = {
{NULL, NULL, NULL}
};
这是错误:
/home/user/php_module/test_module/hello.c:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_functions’
可能是什么问题呢?
Solution:
这是新的 php 5.4 的区别
找到了答案here https://bugs.php.net/bug.php?id=60016
不得不更换function_entry
与静态zend_function_entry
现在可以工作了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)