Hi,

E:\>type try.pl
use ExtUtils::Embed;
print ldopts();

E:\>perl try.pl
Set up gcc environment - 3.4.4 (mingw special)
Note (probably harmless): No library found for perl58.lib  -s
L"E:\Perl815\lib\CORE"  D:\MinGW\lib\libkernel32.a D:\MinGW\lib\libuser32.a
 D:\MinGW\lib\libgdi32.a D:\MinGW\lib\libwinspool.a
D:\MinGW\lib\libcomdlg32.a D:\MinGW\lib\libadvapi32.a
D:\MinGW\lib\libshell32.a D:\MinGW\lib\libole32.a D:\MinGW\lib\liboleaut32.a
D:\MinGW\lib\libnetapi32.a D:\MinGW\lib\libuuid.a D:\MinGW\lib\libws2_32.a
D:\MinGW\lib\libmpr.a D:\MinGW\lib\libwinmm.a D:\MinGW\lib\libversion.a
D:\MinGW\lib\libodbc32.a D:\MinGW\lib\libodbccp32.a D:\MinGW\lib\libmsvcrt.a

E:\>perl -MConfig_m try.pl
  -s -L"E:\Perl815\lib\CORE"  E:\Perl815\lib\CORE\libperl58.a
D:\MinGW\lib\libmsvcrt.a D:\MinGW\lib\libmoldname.a
D:\MinGW\lib\libkernel32.a D:\MinGW\lib\libuser32.a D:\MinGW\lib\libgdi32.a
D:\MinGW\lib\libwinspool.a D:\MinGW\lib\libcomdlg32.a
D:\MinGW\lib\libadvapi32.a D:\MinGW\lib\libshell32.a D:\MinGW\lib\libole32.a
D:\MinGW\lib\liboleaut32.a D:\MinGW\lib\libnetapi32.a D:\MinGW\lib\libuuid.a
D:\MinGW\lib\libwsock32.a D:\MinGW\lib\libmpr.a D:\MinGW\lib\libwinmm.a
D:\MinGW\lib\libversion.a D:\MinGW\lib\libodbc32.a

Missing from the first output is the (fully qualified) name of the perl
import library ... and the fact that perl58.lib is not found is critical
(definitely *not* harmless).

With Config_m.pm, there's no problem.

It seems to come down to this line of code in the ldopts subroutine:

my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path)=MM->ext(join ' ',
($lpath ? "-L$lpath" : ()), $libperl, @potential_libs);

With Config_m.pm, the argument that MM->ext() evaluates is:
-L"E:\Perl815\lib\CORE" libperl58.a

and I find that $ldloadlibs contains 'E:\Perl815\lib\CORE\libperl58.a'.

Without Config_m.pm, the argument that MM->ext() evaluates is:
-L"E:\Perl815\lib\CORE" perl58.lib

and yet $ldloadlibs does *not* contain 'E:\Perl815\lib\CORE\perl58.lib'.

I don't understand why this happens. I don't know if it means ActiveState
need to generate a libperl58.a and link to it, instead of perl58.lib. I have
checked that works wrt ldopts (and it does), but perhaps there's another way
around the problem .....

I came upon this when trying to build PAR-0.89. The myldr\Makefile.PL uses
ExtUtils::Embed::ldopts() in the generation of the myldr\makefile .... and
that's where the fun started .... quite a few hours ago :-)

Cheers,
Rob



_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to