加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php模块不编译.无法识别“static function_entry”

发布时间:2020-12-13 17:36:44 所属栏目:PHP教程 来源:网络整理
导读:我最近重新编译了我的php和突然的旧代码(连同互联网的例子)停止编译. This准确的示例不编译. 有问题的代码片段: static function_entry hello_functions[] = { {NULL,NULL,NULL}}; 这是错误: /home/user/php_module/test_module/hello.c:12: error: expect
我最近重新编译了我的php和突然的旧代码(连同互联网的例子)停止编译.

This准确的示例不编译.

有问题的代码片段:

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的区别
找到答案 here

必须用静态的zend_function_entry替换function_entry

现在工作

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读