我想为php创建一个扩展,我想安装php-cpp
http://www.php-cpp.com/documentation/install
显示错误:
................
zend/constantimpl.h:185:38: error: ‘zend_constant’ has no member named ‘name_len’
zend/constantimpl.h:185:38: error: ‘zend_constant’ has no member named ‘name_len’
zend/constantimpl.h:188:68: error: cannot convert ‘zend_string* {aka _zend_string*}’ to ‘char*’ for argument ‘1’ to ‘char* strncpy(char*, const char*, size_t)’
zend/constantimpl.h:189:62: error: cannot convert ‘zend_string* {aka _zend_string*}’ to ‘char*’ for argument ‘1’ to ‘char* strncpy(char*, const char*, size_t)’
zend/constantimpl.h:190:77: error: cannot convert ‘zend_string* {aka _zend_string*}’ to ‘char*’ for argument ‘1’ to ‘char* strncpy(char*, const char*, size_t)’
zend/constantimpl.h:195:23: error: ‘zend_constant’ has no member named ‘name_len’
zend/constantimpl.h:196:60: error: ‘zend_constant’ has no member named ‘name_len’
make: *** [shared/zend/base.o] Error 1
......要安装此程序,需要将我们的g++编译器升级到上面的4.8.x版本。
如何在centos系统中将我们的g++编译器升级到4.8.x以上版本?
发布于 2016-03-15 22:25:59
我也遇到过这个问题。据我所知,有两种选择:
我不知道从哪里可以得到devtoolset-2 (我的系统管理员为我安装了它),但我相信您可以在网上找到它。请注意,您需要执行诸如export CXX='/opt/rh/devtoolset-2/root/usr/bin/g++'之类的操作,以确保您使用的是较新的编译器。
也许this SO question的答案可能会对选项2有所帮助。
https://stackoverflow.com/questions/34350343
复制相似问题