Freeswitch 1.5已成功安装,Fs_cli运行正常。

我正在使用Centos6。我想让ESL与PHP一起使用。因此,我按照Freeswitch Wiki中编写的步骤制作了PHP的ESL。但是它给出了如下错误:

make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -ggdb -DHAVE_OPENSSL" CXXFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1" CXX_CFLAGS="" -C php
make[1]: Entering directory `/usr/local/src/freeswitch/libs/esl/php'
g++ -I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/usr/local/src/freeswitch/libs/esl/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/src/include -I/usr/local/src/freeswitch/libs/libteletone/src -fPIC -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1  -Wno-unused-label -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
esl_wrap.cpp:741:18: error: zend.h: No such file or directory
esl_wrap.cpp:742:22: error: zend_API.h: No such file or directory
esl_wrap.cpp:743:29: error: zend_exceptions.h: No such file or directory
esl_wrap.cpp:744:17: error: php.h: No such file or directory
esl_wrap.cpp:745:37: error: ext/standard/php_string.h: No such file or directory
esl_wrap.cpp:1093:21: error: php_ini.h: No such file or directory
esl_wrap.cpp:1094:31: error: ext/standard/info.h: No such file or directory
esl_wrap.cpp:803: error: 'E_ERROR' was not declared in this scope
esl_wrap.cpp:824: error: ISO C++ forbids declaration of 'ZEND_RSRC_DTOR_FUNC' with no type
esl_wrap.cpp:824: error: 'SWIG_landfill' was not declared in this scope
esl_wrap.cpp:824: error: expected ',' or ';' before '{' token
esl_wrap.cpp:830: error: variable or field 'SWIG_ZTS_SetPointerZval' declared void
esl_wrap.cpp:830: error: 'zval' was not declared in this scope
esl_wrap.cpp:830: error: 'z' was not declared in this scope
esl_wrap.cpp:830: error: expected primary-expression before 'void'
esl_wrap.cpp:830: error: expected primary-expression before '*' token
esl_wrap.cpp:830: error: 'type' was not declared in this scope
esl_wrap.cpp:830: error: expected primary-expression before 'int'
make[1]: *** [esl_wrap.o] Error 1
make[1]: Leaving directory `/usr/local/src/freeswitch/libs/esl/php'
make: *** [phpmod] Error 2

最佳答案

在顶级freeswitch源目录中重新运行./configure;将选择相关PHP标头的位置。然后尝试再次构建ESL库。

构建完成后,使用make phpmod-install进行安装。

07-24 21:16