Using XML::Twig failure due to Expat module

76 views Asked by At

I am using a Perl source that I compile and use dll of it in my tool. In it I am trying to embed XML::Twig module in perl statically.

XML::Twig is dependent on XML::Parse which need XML::Parse::Expat. I am using Twig module function in my scripts as below:

    my $FILENAME = "C:\\log.xml";
    my $twig= new XML::Twig;

    $twig->parsefile( $FILENAME);    # build the twig
    my $root= $twig->root;           # get the root of the twig (stats)
    my @players= $root->children;    # get the player list

This usage internally calls Parser module which call Expat which throws error as Undefined subroutine &XML::Parser::Expat::ParserCreate called at Expat.pm line 77.

I have dynamically linked perl dll to my tool and also linked Expat.lib Can you please tell if the problem that I am getting is because of some way to Export ParserCreate function which resides in Expat.lib ?

0

There are 0 answers