php模块无法编译.无法识别"static function_entry"; [英] php module does not compile. Does not recognize "static function_entry"

查看:78
本文介绍了php模块无法编译.无法识别"static function_entry";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近重新编译了php,突然旧代码(连同来自互联网的示例)停止了编译.

I have recently recompiled my php and suddenly old code (together with examples from the internet) stopped compiling.

确切示例无法编译

有问题的代码段:

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’

可能是什么问题?

推荐答案

解决方案:
这是新的PHP 5.4的区别 在此处

Solution:
It's the difference for new php 5.4 Found the answer here

必须用静态zend_function_entry

现在工作.

这篇关于php模块无法编译.无法识别"static function_entry";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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