On Wed, 06 May 2009, Sisyphus wrote:
> Playing around trying to build XML-LibXML-Common-0.13 on 64-bit ActivePerl
> (build 1004, perl-5.10.0).
> I'm using the Platform SDK for Windows 2003 R2 compiler (which is the
> compiler that was used to build perl), but the x64 libxml2 and libiconv
> libraries I'm building against were built using the VC 8 compiler.
> 
> It all builds fine, but as soon as the tests are run , there's this nasty
> runtime error crops up when the attempt is made to load XML::LibXML::Common:
> 
> ##########################################
> C:\_32\comp\XML-LibXML-Common-0.13>nmake test
> 
> Microsoft (R) Program Maintenance Utility   Version 7.00.8882
> Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
> 
>         C:\_64\perl1004\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
> 1..8
> # Running under perl version 5.010000 for MSWin32
> # Win32::BuildNumber 1004
> # Current time local: Thu May  7 10:37:41 2009
> # Current time GMT:   Thu May  7 00:37:41 2009
> # Using Test.pm version 1.25
> Can't load 'blib\arch/auto/XML/LibXML/Common/Common.dll' for module
> XML::LibXML:
> :Common: load_file:%1 is not a valid Win32 application at
> C:/_64/perl1004/lib/DynaLoader.pm line 202.
>  at test.pl line 10
> Compilation failed in require at test.pl line 10.
> BEGIN failed--compilation aborted at test.pl line 10.
> NMAKE : fatal error U1077: 'C:\_64\perl1004\bin\perl.exe' : return code
> '0x2'
> Stop.
> ##########################################
> 
> I'm wondering:
> 
> a) What's causing this ? Is it because of the VC 8 compiler involvement ?

Yes.  The VC8 compiled code links against MSVCR80.dll, and you'll need to embed
an assembly binding manifest into your DLL to make sure it can load this library
at runtime.

> b) What to do about it ? Do I need to build libxml2 and libiconv for myself
> using the Platform SDK compiler ?

Either that, or you could embed the manifest manually into your Common.dll using
the mt.exe tool.

Cheers,
-Jan


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to