On Sun, 14 Dec 2008, Erland Sommarskog wrote: > > In ExtUtils::MM_Win32 I find this: > > # 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}); > } > > In the Makefile this ends up right after the link command. > > This code was added in 5.10, but it was not activated until build 1004 > of ActivePerl. In AS1002 which I've used so far, ActivePerl::Config > never looks for the Visual C++ compiler, nor the version of it, so > the hardcoded version 12.00.something applies. But recently I got a > mail from a guy who tried to build my module with AS1004 and got an > error at the mt command, because I had no manifest file. > > What is supposed to achieve? Anything at all? In such case, what am I > as a module author supposed to do with it? I may be missing something, but > I can't make out any sense of it. As far as I understand, this manifest > business has to with managed code, and XS modules count as native code > as far as I know.
The manifest file is supposed to be generated by the compiler. IN VS2005 and later you need to add an excplicit runtime binding manifest to be able to use msvcr80.dll or msvcr90.dll from your code. Otherwise you'll get a runtime error that your code has not been linked correctly. You can either copy the .manifest file around with your .dll or .exe file, or you can embed it as a resource into the executable itself. This manifest has nothing to do with managed code; it is necessary just for the unmanaged C runtime library to solve some side-by-side installation issues. For various reasons (including this manifest business) I don't use the latest Microsoft compilers, so I have no idea why your user is missing the .manifest file. However, if that user can build other XS code with this compiler just fine, then it may be something in your Makefile.PL that is preventing the generation of the .manifest file. In that case some spelunking in ExtUtils::MM_Win32 may be in order. Cheers, -Jan