求助:perl use lib 路径问题

求助:perl use lib 路径问题

在perl脚本中调用cqperl的一些lib

[Copy to clipboard] [ - ]
CODE:
use lib "C:\\Program Files\\Rational\\Common\\lib\\perl5\\site_perl\\5.6.1";
use lib "C:\\Program Files\\Rational\\Common\\lib\\perl5\\5.6.1";
use lib "C:\\Program Files\\Rational\\Common\lib\\perl5";
use lib "C:\\Program Files\\Rational\\Common\\lib";

便会报错:

Can't load 'C:\Program Files\Rational\Common\lib\perl5\site_perl\5.6.1/MSWin32-x
86-multi-thread/auto/CQPerlExt/CQPerlExt.dll' for module CQPerlExt: load_file:内
存位置访问无效。 at C:\Program Files\Rational\Common\lib\perl5\5.6.1/MSWin32-x86
-multi-thread/DynaLoader.pm line 206.
at C:\Program Files\Rational\Common\lib\perl5\site_perl\5.6.1/CQPerlExt.pm line
7
Compilation failed in require at \\192.168.24.15\g$\cqperl\process.pl line 7.
BEGIN failed--compilation aborted at \\192.168.24.15\g$\cqperl\process.pl line 7

难道在windows有问题?


QUOTE:
原帖由 liu6545 于 2008-6-24 18:03 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8653097&ptid=1169672][img]Compilation failed in require at \\192.168.24.15\g$\cqperl\process.pl line 7.
BEGIN failed--compilation aborted at \\192.168.24.15\g$\cqperl\process.pl line 7

楼主把程序拿到本地调试下看看.
放到本地也一样报错

[Copy to clipboard] [ - ]
CODE:
C:\Documents and Settings\liuhonghao>perl d:\process.pl
Can't load 'C:\Perl\lib/MSWin32-x86-multi-thread/auto/CQPerlExt/CQPerlExt.dll' f
or module CQPerlExt: load_file:内存位置访问无效。 at C:\Perl\lib/DynaLoader.pm l
ine 206.
Compilation failed in require at d:\process.pl line 6.
BEGIN failed--compilation aborted at d:\process.pl line 6.

首先看看你的函数使用是否正确!~有的时候是因为错误的代码引发的错误报告,先找找自己代码的原因!~