【问题标题】:Error while building php extension on Ubuntu在 Ubuntu 上构建 php 扩展时出错
【发布时间】:2015-04-01 21:53:46
【问题描述】:

我安装了php5-dev,获取php源码,在里面放了hello_world扩展

<php_source>/ext/hello.

我在 hello dir 中运行这个命令:

phpize
./configure --enable-hello
make

但我有错误:php.h not found :(

我尝试在 php 源路径中运行 ./configure,将文件从 Zend/、TSRM/、main/ 目录放置到 /ext/hello 目录,但是在运行 make 之后我有很多编译错误。我做错了什么?

【问题讨论】:

    标签: php php-extension


    【解决方案1】:

    试试

    ./configure --with-php-config=/path/to/php/bin/php-config --enable-hello
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-02
      • 2014-06-06
      • 2013-01-08
      • 1970-01-01
      • 2020-09-21
      • 2012-07-31
      • 2014-04-07
      • 1970-01-01
      相关资源
      最近更新 更多