i want create a extension for php and i want install php-cpp
http://www.php-cpp.com/documentation/install
show error:
................
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
......
for install this need to upgrade our g++ compiler to version 4.8.x above.
how do "upgrade our g++ compiler to version 4.8.x above" in centos system ?
I've had this problem as well. As far as I know, there are two options:
Upgrade to CentOS 7 - it has g++ 4.8.5
On CentOS 6.7, install devtoolset-2, which includes g++ 4.8.2
I don't know precisely where to get devtoolset-2 (my system administrator installed it for me), but I am sure you can find that online. Note that you will need to do something like
export CXX='/opt/rh/devtoolset-2/root/usr/bin/g++'
to make sure you are using the newer compiler.Perhaps the answers to this SO question might help with option 2.