免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1506 | 回复: 6
打印 上一主题 下一主题

[Mail] maildrop编译时出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-03-11 17:48 |只看该作者 |倒序浏览
环境
redhat9+mysql4.016源代码安装
编译maildrop时,参数如下
./configure --prefix=/usr/local/maildrop --without-db --enable-sendmail=/usr/sbin/sendmail--enable-trusted-users='root maildrop' --enable-maildropmysql --with-mysqlconfig=/etc/maildrop.mysql --enable-maildirquota --with-trashquota --with-dirsync
这一步没有问题

make时,出现如下错误
mdmysql.c:10:25: mysql/mysql.h: No such file or directory
mdmysql.c:11:26: mysql/errmsg.h: No such file or directory
mdmysql.c: In function `get_user_mysql':
mdmysql.c:17: `MYSQL' undeclared (first use in this function)
mdmysql.c:17: (Each undeclared identifier is reported only once
mdmysql.c:17: for each function it appears in.)
mdmysql.c:17: parse error before "mysql_buf"
mdmysql.c:18: `MYSQL_RES' undeclared (first use in this function)
mdmysql.c:18: `result' undeclared (first use in this function)
mdmysql.c:19: `MYSQL_ROW' undeclared (first use in this function)
mdmysql.c:19: parse error before "row"
mdmysql.c:32: `mysql' undeclared (first use in this function)
mdmysql.c:32: warning: implicit declaration of function `mysql_connect'
mdmysql.c:32: `mysql_buf' undeclared (first use in this function)
mdmysql.c:32: `server' undeclared (first use in this function)
mdmysql.c:32: `userid' undeclared (first use in this function)
mdmysql.c:32: `password' undeclared (first use in this function)
mdmysql.c:37: warning: implicit declaration of function `mysql_select_db'
mdmysql.c:39: warning: implicit declaration of function `mysql_close'
mdmysql.c:64: warning: implicit declaration of function `mysql_query'
mdmysql.c:73: warning: implicit declaration of function `mysql_store_result'
mdmysql.c:81: warning: implicit declaration of function `mysql_num_rows'
mdmysql.c:83: warning: implicit declaration of function `mysql_free_result'
mdmysql.c:88: `row' undeclared (first use in this function)
mdmysql.c:88: warning: implicit declaration of function `mysql_fetch_row'
make[2]: *** [mdmysql.o] Error 1
make[2]: Leaving directory `/usr/local/pat/maildrop-1.6.3/maildrop'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/pat/maildrop-1.6.3/maildrop'
make: *** [all-recursive] Error 1
[root@pat maildrop-1.6.3]#

请问这是什么问题?如何解决?

如果configure不带参数
./configure
make
make install-strip
一切OK,没有上面的错误,但好象不支持mysql了

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2004-03-11 22:32 |只看该作者

maildrop编译时出错

mysql路径配置错误

论坛徽章:
0
3 [报告]
发表于 2004-03-12 11:31 |只看该作者

maildrop编译时出错

我是源代码安装的 export PATH=$PATH:/usr/local/mysql/bin
应该mysql路径没错

mdmysql.c:10:25: mysql/mysql.h: No such file or directory
mdmysql.c:11:26: mysql/errmsg.h: No such file or directory

从这个错误看来,我想可是maildrop缺少文件

论坛徽章:
0
4 [报告]
发表于 2004-03-12 14:49 |只看该作者

maildrop编译时出错

mdmysql.c:10:25: mysql/mysql.h: No such file or directory
mdmysql.c:11:26: mysql/errmsg.h: No such file or directory
我查过
mdmysql.c文件的第10行如下
   10 #include <mysql/mysql.h>;
     11 #include <mysql/errmsg.h>;

[root@pat maildrop-1.6.3]#locate mysql.h
[root@pat maildrop-1.6.3]# /usr/local/mysql/include/mysql/mysql.h

[root@pat maildrop-1.6.3]# echo $PATH
[root@pat maildrop-1.6.3]# /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/local/mysql/include/

我该怎么办?请大家帮忙

论坛徽章:
0
5 [报告]
发表于 2004-03-12 15:05 |只看该作者

maildrop编译时出错

maildrop没找到你的Mysql所安装的位置。

CFLAGS="-I/usr/local/mysql/include"
LDFLAGS="-L/usr/local/mysql/lib"
exports CFLAGS LDFLAGS

论坛徽章:
0
6 [报告]
发表于 2004-03-12 16:16 |只看该作者

maildrop编译时出错

谢谢hefish的回复 

我是这样做的
export PATH=$PATH:/usr/local/mysql/include
请问这样为什么不行呢?

而我做如下打操作又可以了
#cd /usr/include
#ln -s /usr/local/mysql/include mysql

论坛徽章:
0
7 [报告]
发表于 2004-03-28 17:03 |只看该作者

maildrop编译时出错

看看是否装了mysql-devel-***这个包
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP