On Tue, 05 May 2009, John Dlugosz wrote:
> I'm having trouble installing CPAN modules on a Windows x64 machine
> running ActiveState Perl. The compiler (Visual Studio 2005) is not
> given the correct options to include the manifest file at link-time.
> And the DLLs won't run without it.
ExtUtils::MM_Win32 contains code that embeds the manifest files, but only
for the 32-bit compiler:
# 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 [email protected] -outputresource:$@;2 && del
[email protected]});
}
}
This is improved in the latest ExtUtils::MakeMaker like this:
# Embed the manifest file if it exists
push(@m, q{
if exist [email protected] mt -nologo -manifest [email protected]
-outputresource:$@;2
if exist [email protected] del [email protected]});
}
We don't need to check compiler versions; if the linker produced a .manifest
file,
then we assume we also have the mt.exe utility available and will embed it. The
.manifest is then deleted to avoid installing it together with the .dll.
So maybe Module::Build needs something similar.
The reason the manifest binding was disabled for 64-bit was that the
free compiler included in the Windows 2003 R2 Platform SDK is a variant
of VS2005 that links against the 64-bit version of MSVCRT.dll that is
part of Windows itself and not against the compiler specific MSVCR80.dll.
You can download that version of the SDK here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
Cheers,
-Jan