Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Compile-Errors with php7.1-dev

Hallo,

i have a problem with compiling. I always get a lot of zend-errors.

e.g.

/usr/include/php/20160303/Zend/zend-types.h:645:15: error: incompatible types when initializing type 'struct zval *' using type 'zval'
    zval *__z = (z);        \
                ^
/usr/include/php/20160303/Zend/zend-API.h:580:3: note: in expansion of macro 'ZVAL_NEW_STR'
    ZVAL_NEW_STR(z, zend_string_init(s, l, 0));     \
    ^

php -v gives me PHP 7.1.12 with Zend Engine v3.1.0

zephir help gives me Version 0.10.7

apt-get install php7.1-dev is the newest available

What am I missing? I've had php7.0 before and php5 also, but I think I have removed this old versions completely. The command in the .zep-File is just a %{ ZVAL_STRING (variable1, (char *)array_name[array_element]); }%

Can anybody help me please find the error in my installation?!

Thank you, Martin



103
Accepted
answer

Sorry. I wrote too early. Everything works fine.

I missed the pointing '&'.

%{ ZVAL_STRING (&variable1, (char *)array_name[array_element]); }%