解决php不能编译bcmath的问题

来源:互联网 发布:移动网络玩守望 编辑:程序博客网 时间:2024/06/05 22:41

在编译php的bcmath模块时,会出现类似下面的错误:

error: '_zero_' undeclared (first use in this function)

 

这是因为bcmath的代码bug引起的,编辑bcmath的“libbcmath/src/bcmath.h”文件,在“#include "bcmath.h”之前插入以下内容:

#include "../../config.h"

 

这样就能顺利通过编译了。