我尝试安装最新版本的zip:http://pecl.php.net/package/zip
我尝试以不同的方式做到这一点:
//first case:
pecl install zip-1.12.4
//second case:
wget http://pecl.php.net/package/zip/1.12.4
tar xzf zip-1.12.4
cd ./zip-1.12.4
phpize
./configure --disable-static --enable-shared --enable-zip
--with-php-config=/usr/local/bin/php-config
make & make install
但在这两种情况下我都有相同的结果:两个文件zip.a& zip.la而不是zip.so
命令如:
//Building Shared Library from static Library
gcc -shared -o zip.so -Wl,--whole-archive zip.a
ld -shared -o zip.so --whole-archive zip.a
不成功,来自输出的几个错误:
zip.a(php_zip.o):在函数zm_info_zip':
/tmp/pear/install/zip/php_zip.c:3155: undefined reference to
中php_info_print_table_start'
/tmp/pear/install/zip/php_zip.c:3157:对php_info_print_table_row'
/tmp/pear/install/zip/php_zip.c:3158: undefined reference to
php_info_print_table_row'的未定义引用
/tmp/pear/install/zip/php_zip.c:3159:对php_info_print_table_row'
/tmp/pear/install/zip/php_zip.c:3160: undefined reference to
php_info_print_table_row'的未定义引用
zip.a(php_zip.o):在函数zm_shutdown_zip':
/tmp/pear/install/zip/php_zip.c:3144: undefined reference to
中,zend_hash_destroy'
/tmp/pear/install/zip/php_zip.c:3145:未定义引用`php_unregister_url_stream_wrapper'
任何想法如何解决这个问题? 我的工作环境:Cygwin(在WinXP下)和PHP + MySQL + nginx(当然在Cygwin下)