高手们来帮我看看,[perl链接mysql的问题] 急! 50分

333sunshine 2008-04-21 07:10:18
C:\Perl\DBD-mysql-4.006>perl makefile.pl
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help

文档上面说是perl makefile.pl执行就可以。但是我执行报错啊。

=============================================
后来,我加上了cflags,libs之后,执行如下
C:\Perl\DBD-mysql-4.006>perl Makefile.pl --cflags=-ID:\include --libs="-LD:\lib
-lmysqlclient"

I will use the following settings for compiling and testing:

cflags (User's choice) = -ID:\include
embedded (guessed ) =
libs (User's choice) = -LD:\lib -lmysqlclient
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Argument "6.42_01" isn't numeric in numeric ge (>=) at Makefile.pl line 355.
Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in: C:/Perl/site/lib/auto/DBI/ C:/Perl/lib/a
uto/DBI/ at Makefile.pl line 739
Using DBI 1.602 (for perl 5.010000 on MSWin32-x86-multi-thread) installed in C:/
Perl/site/lib/auto/DBI/
Writing Makefile for DBD::mysql

它生成了一个,makefile文件,但是我运行下面的make后还是报错,代码如下:
C:\Perl\DBD-mysql-4.006>make
MAKE Version 4.0 Copyright (c) 1987, 1996 Borland International
Error makefile 350: Colon expected
Error makefile 916: Redefinition of target 'dbdimp.obj'
Error makefile 923: Redefinition of target 'dbdimp.obj'
*** 3 errors during make ***

急救 ,怎么回事呢?
...全文
204 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaoyu9805119 2008-04-29
  • 打赏
  • 举报
回复
windows下建议用activeperl,里面的PPM还是方便的
yourway 2008-04-26
  • 打赏
  • 举报
回复
第一部的错误是说你需要指定mysql.h所在的路径。一般是在mysql的安装文件夹下面的include目录,如果mysql装在C:\program files\mysql,那么就是C:\program files\mysql\include

不知道你是不是装得ActivePerl,如果是,可以用ppm命令在线安装预编译好的DBI和DBD-mysql模块。
或者去www.activeperl.com下载预编译好的模块然后用ppm安装也可以。

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧