Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make 会出现 PHP_FE_END 的错误 #1

Closed
sdlla opened this issue Apr 10, 2015 · 6 comments
Closed

make 会出现 PHP_FE_END 的错误 #1

sdlla opened this issue Apr 10, 2015 · 6 comments

Comments

@sdlla
Copy link

sdlla commented Apr 10, 2015

[root@localhost opencc4php]# make
/bin/sh /var/www/html/opencc4php/libtool --mode=compile cc -I. -I/var/www/html/opencc4php -DPHP_ATOM_INC -I/var/www/html/opencc4php/include -I/var/www/html/opencc4php/main -I/var/www/html/opencc4php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/opencc -DHAVE_CONFIG_H -g -O2 -c /var/www/html/opencc4php/opencc.c -o opencc.lo
libtool: compile: cc -I. -I/var/www/html/opencc4php -DPHP_ATOM_INC -I/var/www/html/opencc4php/include -I/var/www/html/opencc4php/main -I/var/www/html/opencc4php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/opencc -DHAVE_CONFIG_H -g -O2 -c /var/www/html/opencc4php/opencc.c -fPIC -DPIC -o .libs/opencc.o
/var/www/html/opencc4php/opencc.c: In function 'zif_opencc_close':
/var/www/html/opencc4php/opencc.c:79:16: warning: initialization makes pointer from integer without a cast [enabled by default]
/var/www/html/opencc4php/opencc.c: In function 'zif_opencc_error':
/var/www/html/opencc4php/opencc.c:105:6: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/var/www/html/opencc4php/opencc.c: At top level:
/var/www/html/opencc4php/opencc.c:212:2: error: 'PHP_FE_END' undeclared here (not in a function)
make: *** [opencc.lo] Error 1

make 会出现 PHP_FE_END 的错误
我在网上查到的资料都是屏蔽掉,如:
//PHP_FE_END
{NULL,NULL,NULL}

但还是无法正常运作,请问要如何排除,谢谢
CentOS 6.6
PHP 5.3.3

@nauxliu
Copy link
Owner

nauxliu commented Apr 10, 2015

在 php_opencc.h 文件添加下面的代码试试看

#ifndef PHP_FE_END
#define PHP_FE_END {NULL, NULL, NULL}
#endif

不行我再下载老版本的 Centos 调整。

@nauxliu
Copy link
Owner

nauxliu commented Apr 10, 2015

@sdlla
Copy link
Author

sdlla commented Apr 14, 2015

安装成功了,感恩

@sdlla sdlla closed this as completed Apr 14, 2015
@nauxliu
Copy link
Owner

nauxliu commented Apr 14, 2015

@sdlla 你的解决方案可以贴出来吗,方便后面遇到问题的人可查询。

@sdlla
Copy link
Author

sdlla commented Apr 14, 2015

抱歉,就是用你的提供的方法,在 php_opencc.h 后面加上
#ifndef PHP_FE_END
#define PHP_FE_END {NULL, NULL, NULL}
#endif

@nauxliu
Copy link
Owner

nauxliu commented Apr 14, 2015

@sdlla 好的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants