热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

PHP7编译PDOMySQL遇到[mysql_driver.lo]错误1的解决方案及调试方法

在编译PHP7的PDOMySQL扩展时,可能会遇到`[mysql_driver.lo]`错误1。该问题通常出现在`pdo_mysql_fetch_error_func`函数中。本文详细介绍了导致这一错误的常见原因,包括依赖库版本不匹配、编译选项设置不当等,并提供了具体的解决步骤和调试方法,帮助开发者快速定位并解决问题。

错误如下

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c: In function ‘ pdo_mysql_fetch_error_func ’:

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:132: error: too many arguments to function ‘ add_next_index_string ’

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c: In function ‘ mysql_handle_preparer ’:

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:183: warning: passing argument 5 of ‘ pdo_parse_params ’ from incompatible pointer type

/usr/local/php/include/php/ext/pdo/php_pdo_driver.h:678: note: expected ‘ size_t *’ but argument is of type ‘ int *’

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:336:64: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c: In function ‘ pdo_mysql_get_attribute ’:

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:336: error: ‘ ZVAL_STRING ’ undeclared (first use in this function)

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:336: error: (Each undeclared identifier is reported only once

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:336: error: for each function it appears in.)

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:340:73: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:344:71: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:351:37: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c: At top level:

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:385: warning: initialization from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:386: warning: initialization from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:387: warning: initialization from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:392: warning: initialization from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c: In function ‘ pdo_mysql_handle_factory ’:

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:492: warning: assignment from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:502: warning: assignment from incompatible pointer type

/usr/local/PDO_MYSQL-1.0.2/mysql_driver.c:512: warning: assignment from incompatible pointer type

make: *** [mysql_driver.lo] Error 1



推荐阅读
author-avatar
菜牛
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有