develooper Front page | perl.perl5.porters | Postings from December 2008

RE: [perl #61492] ExtUtils::MM_Win32 should not generate "mt" command when CRT is statically linked

Thread Previous | Thread Next
From:
Steve Hay
Date:
December 19, 2008 09:43
Subject:
RE: [perl #61492] ExtUtils::MM_Win32 should not generate "mt" command when CRT is statically linked
Message ID:
1B32FF956ABF414C9BCE5E487A1497E702C2CF27@ukmail02.planit.group
Jan Dubois wrote:
>> Erland Sommarskog (via RT) wrote:
>>> ExtUtils::MM_Win32 includes these lines:
>>> 
>>>       # VS2005 (aka VC 8) or higher, but not for 64-bit compiler
>>>       from Platform SDK if ($Config{ivsize} == 4 && $Config{cc} eq
>>>     'cl' and $Config{ccversion} =~ /^(\d+)/ and $1 >= 14) {        
>>>           push(@m, q{
>>>    mt -nologo -manifest $@.manifest -outputresource:$@;2 && del    
>>> $@.manifest}); } 
>>> 
>>> I am told the that "mt" command is there, because VC8 and later
>>> generates a manifest file that is needed to use the MSVCRT80.DLL or
>>> corresponding file. 
>>> 
>>> However, if you opt to link statically to the CRT and thus
>>> include the CRT routines in your own DLL, VC80 will not generate
>>> any manifest file, and the "mt" command and thus the entire build
>>> will fail. 
>>> 
>>> Note that there are several options to request static linkage:
>>> /MT,/MTd and a couple more.
> 
> I don't think it is feasible to detect static vs. dynamic linking by
> analyzing all the compile and link options.  It would be much easier
> to only invoke the `mt` command if the compile step actually
> generated a manifest: 
> 
>     if exist $@.manifest mt -nologo -manifest $@.manifest ...
>     if exist $@.manifest del $@.manifest
> 

Thanks, applied as 4adc95e616bac7eea015e9e47e439b063c1132d5.

Erland, are you able to rsync the latest perl-current and verify whether
this change solves your problem?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About