Ten watek jest posrednio nawiazaniem do poprzedniego Tablica z domknięciami zwracającymi leniwie instancje klas.
Tym razem chodzi o to ze, proboje odpalic narzedzie do pisania rozszerzen php w jezyku C++ i juz na wstepie wywala mi blad w kompilacji.
Bede bardzo ($$$ - dogadamy sie) wdzieczny za pomoc.
Na wszelki wypadek przygotowalem z'Docker'yzowane srodowisko :
$ git clone https://gitlab.com/slim-4-modular/php-cpp.git
$ cd php-cpp
$ bin/install-dev
$ make
W razie czego w przypadku wyjscia i koniecznosci powtornego wejscia do kontenera:
$ docker-compose exec -u 1000 php-cpp bash
I ostatecznie blad wynikajacy z uzycia polecenia make
:
I have no name!@9f1a814eaec5:/php-cpp$ make
mkdir -p shared/common
mkdir -p shared/zend
g++ -Wall -c -std=c++11 -fvisibility=hidden -DBUILDING_PHPCPP -Wno-write-strings -MD -g `php-config --includes` -fpic -o shared/zend/base.o zend/base.cpp
In file included from zend/includes.h:121,
from zend/base.cpp:8:
zend/callable.h: In constructor 'Php::Callable::Callable(Php::ZendCallback, const char*, const Arguments&)':
zend/callable.h:56:18: error: 'struct _zend_internal_arg_info' has no member named 'is_variadic'
56 | _argv[i].is_variadic = false;
| ^~~~~~~~~~~
zend/callable.h:57:18: error: 'struct _zend_internal_arg_info' has no member named 'pass_by_reference'
57 | _argv[i].pass_by_reference = false;
| ^~~~~~~~~~~~~~~~~
zend/callable.h:63:25: error: no match for 'operator=' (operand types are 'zend_type' and 'int')
63 | _argv[i].type = 0;
| ^
In file included from /usr/local/include/php/Zend/zend.h:27,
from /usr/local/include/php/main/php.h:31,
from zend/includes.h:40,
from zend/base.cpp:8:
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate: 'zend_type& zend_type::operator=(const zend_type&)'
134 | } zend_type;
| ^~~~~~~~~
/usr/local/include/php/Zend/zend_types.h:134:3: note: no known conversion for argument 1 from 'int' to 'const zend_type&'
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate: 'zend_type& zend_type::operator=(zend_type&&)'
/usr/local/include/php/Zend/zend_types.h:134:3: note: no known conversion for argument 1 from 'int' to 'zend_type&&'
In file included from zend/includes.h:121,
from zend/base.cpp:8:
zend/callable.h: In member function 'void Php::Callable::fill(zend_internal_arg_info*, const Php::Argument&) const':
zend/callable.h:207:50: error: 'ZEND_TYPE_ENCODE' was not declared in this scope; did you mean 'ZEND_TYPE_NAME'?
207 | case Type::Undefined: info->type = ZEND_TYPE_ENCODE(IS_UNDEF, arg.allowNull()); break; // undefined means we'll accept any type
| ^~~~~~~~~~~~~~~~
| ZEND_TYPE_NAME
zend/callable.h:218:58: error: no matching function for call to 'zend_type::zend_type(const char*)'
218 | else info->type = (zend_type)arg.encoded();
| ^
In file included from /usr/local/include/php/Zend/zend.h:27,
from /usr/local/include/php/main/php.h:31,
from zend/includes.h:40,
from zend/base.cpp:8:
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate: 'zend_type::zend_type()'
134 | } zend_type;
| ^~~~~~~~~
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate expects 0 arguments, 1 provided
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate: 'constexpr zend_type::zend_type(const zend_type&)'
/usr/local/include/php/Zend/zend_types.h:134:3: note: no known conversion for argument 1 from 'const char*' to 'const zend_type&'
/usr/local/include/php/Zend/zend_types.h:134:3: note: candidate: 'constexpr zend_type::zend_type(zend_type&&)'
/usr/local/include/php/Zend/zend_types.h:134:3: note: no known conversion for argument 1 from 'const char*' to 'zend_type&&'
In file included from zend/includes.h:121,
from zend/base.cpp:8:
zend/callable.h:229:15: error: 'zend_internal_arg_info' {aka 'struct _zend_internal_arg_info'} has no member named 'is_variadic'
229 | info->is_variadic = false;
| ^~~~~~~~~~~
zend/callable.h:232:15: error: 'zend_internal_arg_info' {aka 'struct _zend_internal_arg_info'} has no member named 'pass_by_reference'
232 | info->pass_by_reference = arg.byReference();
| ^~~~~~~~~~~~~~~~~
make: *** [Makefile:219: shared/zend/base.o] Error 1
I have no name!@9f1a814eaec5:/php-cpp$