能否支持编译静态库呢?
xavieryang007 opened this issue · 4 comments
是否支持静态库,这样可以更方便扩展的开发和迁移
你是指phpx.so的静态库吗。
@owenliang 是的
make -j 4编译时报错【php7.1.7 centos7.5】
[ 10%] [ 20%] Building CXX object CMakeFiles/phpx.dir/src/array.o
[ 30%] Building CXX object CMakeFiles/phpx.dir/src/base.o
Building CXX object CMakeFiles/phpx.dir/src/class.o
In file included from /root/PHP-X/src/array.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
[ 40%] In file included from /root/PHP-X/src/class.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
Building CXX object CMakeFiles/phpx.dir/src/exec.o
In file included from /root/PHP-X/src/base.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/phpx.dir/src/array.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /root/PHP-X/src/exec.cc:19:0:
/root/PHP-X/include/phpx.h:23:17: fatal error: php.h: No such file or directory
#include "php.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/phpx.dir/src/class.o] Error 1
make[2]: *** [CMakeFiles/phpx.dir/src/base.o] Error 1
make[2]: *** [CMakeFiles/phpx.dir/src/exec.o] Error 1
make[1]: *** [CMakeFiles/phpx.dir/all] Error 2
make: *** [all] Error 2
@hawk140 执行php-config命令,看是否存在有效输出:
[root@10-10-182-80 service]# php-config
Usage: /usr/local/bin/php-config [OPTION]
Options:
--prefix [/usr/local]
--includes [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib]
--ldflags [ -L/usr/local/lib]
--libs [-lcrypt -lz -lcrypt -lrt -lmcrypt -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -lcurl -lssl -lcrypto -lssl -lcrypto -lz -lrt -lxml2 -lz -lm -lssl -lcrypto -lfreetype -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lssl -lcrypto -lcrypt ]
--extension-dir [/usr/local/lib/php/extensions/no-debug-non-zts-20160303]
--include-dir [/usr/local/include/php]
--man-dir [/usr/local/php/man]
--php-binary [/usr/local/bin/php]
--php-sapis [ cli fpm phpdbg cgi]
--configure-options [--enable-fpm --with-mcrypt --with-zlib --with-gd --with-curl --enable-mbstring --with-jpeg-dir --with-iconv --enable-sockets --with-mysqli --enable-exif --with-png-dir --with-freetype-dir --with-openssl --with-bz2 --enable-zip --enable-soap --with-pdo-mysql --enable-ftp --enable-bcmath]
--version [7.1.13]
--vernum [70113]