I'm attempting to compile ODBTP 1.1.4 as a static PHP extension following documentation. When attempting to compile PHP, I receive the following errors:
<pre><code>
ext/odbtp/php_odbtp.o: In function `zif_odbtp_bind':
php-5.3.0/ext/odbtp/php_odbtp.c:4050: undefined reference to `ZVAL_ADDREF'
ext/odbtp/php_odbtp.o: In function `php_odbtp_attach_variable':
php-5.3.0/ext/odbtp/php_odbtp.c:1927: undefined reference to `ZVAL_ADDREF'
collect2: ld returned 1 exit status
make: *** Error 1
</code></pre>
PHP 5.2.11 will compile just fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm attempting to compile ODBTP 1.1.4 as a static PHP extension following documentation. When attempting to compile PHP, I receive the following errors:
<pre><code>
ext/odbtp/php_odbtp.o: In function `zif_odbtp_bind':
php-5.3.0/ext/odbtp/php_odbtp.c:4050: undefined reference to `ZVAL_ADDREF'
ext/odbtp/php_odbtp.o: In function `php_odbtp_attach_variable':
php-5.3.0/ext/odbtp/php_odbtp.c:1927: undefined reference to `ZVAL_ADDREF'
collect2: ld returned 1 exit status
make: *** Error 1
</code></pre>
PHP 5.2.11 will compile just fine.
ZVALADDREF is no longer defined in PHP 5.3. The fix is in CVS. For convenience add the following lines in phpodbtp.c after the #include lines:
#ifndef ZVAL_ADDREF /* Required for PHP >5.3 */
#define ZVAL_ADDREF Z_ADDREF_P
#endif
Hey that works.
The forum seems to have dropped some characters. It should read:
<pre><code>
#ifndef ZVAL_ADDREF /* Required for PHP >5.3 */
#define ZVAL_ADDREF Z_ADDREF_P
#endif
</code></pre>
Thanks.