2016-07-19 132 views
0

我很努力在ActiveState Perl 5.16.0上设置LibXML。在ActiveState Perl 5.16.0上安装XML :: LibXML的问题。在Windows上

到目前为止,我跟着这个职位How can I install Lib::XML on ActiveState Perl 5.20?的Instructor作业:

First, get the libxml2 binaries from http://xmlsoft.org/sources/win32/ (currently also available at http://www.zlatkovic.com/pub/libxml/). 

You need: 

iconv-VERSION.win32.zip 
libxml2-VERSION.win32.zip 
zlib-VERSION.win32.zip 
Download the latest version of each. (Each package will probably have a different version.) When you extract them, you'll get directories named iconv-VERSION.win32, libxml2-VERSION.win32, and zlib-VERSION.win32, each containing bin, lib, and include directories. 

Combine all the bin, include, and lib directories under c:\Prog\LibXML. (You can use any directory you prefer; just adjust the instructions accordingly.) 

Get the latest version of XML-LibXML from CPAN. Extract it. 

Issue these commands in the XML-LibXML-VERSION directory: 

perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib 
dmake 
copy c:\Prog\LibXML\bin\*.dll blib\arch\auto\XML\LibXML 
dmake test 
dmake install 

于是我下载了所有的包和寄托都工作得很好,我可以运行makefile.pl

但是当我现在尝试运行dmake,我得到以下错误:

Devel.o:Devel.c:(.text+0x985): undefined reference to `_imp__xmlMemStrdup' 
LibXML.o:LibXML.c:(.text+0x4374): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x4d5b): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x513c): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x52bb): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x5c23): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x5d13): more undefined references to `_imp__xmlFree' follow 
LibXML.o:LibXML.c:(.text+0xef7a): undefined reference to `_imp__xmlMalloc' 
LibXML.o:LibXML.c:(.text+0xefb6): undefined reference to `_imp__xmlMalloc' 
LibXML.o:LibXML.c:(.text+0xf042): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0xf053): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0xf907): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x10384): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x10399): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x106f9): more undefined references to `_imp__xmlFree' follow 
LibXML.o:LibXML.c:(.text+0x2a092): undefined reference to `_imp__xmlIsBaseCharGroup' 
LibXML.o:LibXML.c:(.text+0x2a171): undefined reference to `_imp__xmlIsDigitGroup' 
LibXML.o:LibXML.c:(.text+0x2a1d4): undefined reference to `_imp__xmlIsCombiningGroup' 
LibXML.o:LibXML.c:(.text+0x2a1ed): undefined reference to `_imp__xmlIsExtenderGroup' 
LibXML.o:LibXML.c:(.text+0x2a211): undefined reference to `_imp__xmlIsBaseCharGroup' 
LibXML.o:LibXML.c:(.text+0x2a374): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x2a4b7): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x2a60c): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x2a720): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x2a72a): undefined reference to `_imp__xmlFree' 
LibXML.o:LibXML.c:(.text+0x2a76f): more undefined references to `_imp__xmlFree' follow 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x7fa): undefined reference to `_imp__xmlMalloc' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x831): undefined reference to `_imp__xmlMalloc' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x97d): undefined reference to `_imp__xmlFree' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0xfa4): undefined reference to `_imp__xmlMalloc' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x1004): undefined reference to `_imp__xmlFree' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x168c): undefined reference to `_imp__xmlFree' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x16a5): undefined reference to `_imp__xmlFree' 
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x1795): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1a34): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1a65): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1aab): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1af4): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1b67): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1bf0): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1d04): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x271a): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x272f): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x2839): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x2847): undefined reference to `_imp__xmlFree' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x28e1): more undefined references to `_imp__xmlFree' follow 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5ce5): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5d94): undefined reference to `_imp__xmlMalloc' 
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5efc): undefined reference to `_imp__xmlFree' 
xpath.o:xpath.c:(.text+0x260): undefined reference to `_imp__xmlFree' 
xpath.o:xpath.c:(.text+0x2ab): undefined reference to `_imp__xmlFree' 
xpath.o:xpath.c:(.text+0x3e7): undefined reference to `_imp__xmlFree' 
collect2.exe: error: ld returned 1 exit status 
dmake.exe: Error code 129, while making 'blib\arch\auto\XML\LibXML\LibXML.dll' 

有谁知道如何解决这个问题?任何帮助是极大的赞赏!

谢谢!

+0

你在任何代理?你怎么安装它? – serenesat

+1

来自经验:这是一个巨大的痛苦,但它捆绑在草莓perl。这就是我转换的原因。 – Sobrique

+0

'可以运行makefile.pl'显示你如何运行它。显示你如何组合各种二进制文件的先决条件。需要从你的更多信息 –

回答

0

正如你所说你正在使用代理。用这个去吧:

您可以使用这些命令从ppm或cpan安装模块。

打开命令提示符并运行这些命令:

set http_proxy=http://xxx.xxx.xxx.x:yyyy (xxx is your system proxy and yyyy is port) 
set http_proxy_user=username (system login username) 
set http_proxy_pass=password (login password) 

要安装从CPAN类型的模块:

cpan install modulename 
+0

我试过这个,但它没有找到xml2或libxml2,然后:检查是否能够链接到xml2 ...否 检查链接到libxml2的能力... libxml2,zlib和/或数学库(-lm)未找到。 – user6608600

+0

如果我用ppm进行测试,它只是说“没有缺少安装包” – user6608600