mkoppanen / php-zbarcode

PHP extension for reading barcodes. Uses ImageMagick(http://www.imagemagick.org/) for image support and zbar(http://zbar.sourceforge.net/) for scanning the barcodes.
http://valokuva.org
383 stars 131 forks source link

make test error: too few arguments to function ‘zbar_version’ zbar_version(&major, &minor); #35

Closed mrg123 closed 3 years ago

mrg123 commented 3 years ago

system: centos 8.4 php: 7.0 when i make ,make test get error: too few arguments to function ‘zbar_version’

open zbarcode.c change code

PHP_MINFO_FUNCTION(zbarcode)
{
    unsigned int major = 0, minor = 0;
    char *zbar_ver = NULL;
    unsigned long magick_version;

    zbar_version(&major, &minor);
    spprintf(&zbar_ver, 24, "%d.%d", major, minor);

to

PHP_MINFO_FUNCTION(zbarcode)
{
    unsigned int major = 0, minor = 0, patch = 0;
    char *zbar_ver = NULL;
    unsigned long magick_version;

    zbar_version(&major, &minor, &patch);
    spprintf(&zbar_ver, 24, "%d.%d.%d", major, minor,patch);

try again

#git clone https://github.com/mkoppanen/php-zbarcode.git php-zbarcode
#cd php-zbarcode 
#/usr/local/php/bin/phpize #write right php path
#./configure --with-php-config=/usr/local/php/bin/php-config  #write right php version config path
#make test
#make && make install
#make test

work well

mrg123 commented 3 years ago

Already resolved