Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/137.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在Windows上安装规范化XML Perl包_C++_Xml_Windows_Perl_Compiler Errors - Fatal编程技术网

C++ 在Windows上安装规范化XML Perl包

C++ 在Windows上安装规范化XML Perl包,c++,xml,windows,perl,compiler-errors,C++,Xml,Windows,Perl,Compiler Errors,我是Perl新手,我开始从事一个需要一些模块的项目。其中一个是似乎无法安装 我正在使用草莓Perl和CPAN进行包处理 我尝试从下载的tar.gz文件手动编译包,但发生了与g++编译中似乎发生的相同的错误: CPAN.pm: Building S/SJ/SJZASADA/XML-CanonicalizeXML-0.05.tgz 'xml2-config' is not recognized as an internal or external command, operable progr

我是Perl新手,我开始从事一个需要一些模块的项目。其中一个是似乎无法安装

我正在使用草莓Perl和CPAN进行包处理

我尝试从下载的tar.gz文件手动编译包,但发生了与g++编译中似乎发生的相同的错误:

  CPAN.pm: Building S/SJ/SJZASADA/XML-CanonicalizeXML-0.05.tgz

'xml2-config' is not recognized as an internal or external command,
operable program or batch file.
'xml2-config' is not recognized as an internal or external command,
operable program or batch file.
Checking if your kit is complete...
Looks good
'xml2-config' is not recognized as an internal or external command,
operable program or batch file.
'xml2-config' is not recognized as an internal or external command,
operable program or batch file.
MakeMaker (v6.64)
Warning (non-fatal): Target 'dynamic' depends on targets in skipped section 'dyn
amic_lib'
Warning (non-fatal): Target 'static' depends on targets in skipped section 'stat
ic_lib'
Writing Makefile for Mytest2::canon
Writing MYMETA.yml and MYMETA.json
Writing Makefile for XML::CanonicalizeXML
Writing MYMETA.yml and MYMETA.json
cp lib/XML/CanonicalizeXML.pm blib\lib\XML\CanonicalizeXML.pm
AutoSplitting blib\lib\XML\CanonicalizeXML.pm (blib\lib\auto\XML\CanonicalizeXML
)
cd canon && dmake
gcc -c  -I.     -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -
DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2     -DVERSION=\"\"
        -DXS_VERSION=\"\"  "-IC:\strawberry\perl\lib\CORE"   canon.c
ar cr libcanon.a canon.o
rem libcanon.a
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp  -typemap
 C:\strawberry\perl\lib\ExtUtils\typemap  CanonicalizeXML.xs > CanonicalizeXML.x
sc && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- CanonicalizeX
ML.xsc CanonicalizeXML.c
Please specify prototyping behavior for CanonicalizeXML.xs (see perlxs manual)
gcc -c  -I.     -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -
DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2     -DVERSION=\"0.
05\"    -DXS_VERSION=\"0.05\"  "-IC:\strawberry\perl\lib\CORE"   CanonicalizeXML
.c
CanonicalizeXML.xs: In function 'XS_XML__CanonicalizeXML_canonicalize':
CanonicalizeXML.xs:28:17: warning: passing argument 6 of 'canonicalize' from inc
ompatible pointer type [enabled by default]
canon/canon.h:2:12: note: expected 'char *' but argument is of type 'xmlChar **'

Running Mkbootstrap for XML::CanonicalizeXML ()
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Canonicalize
XML.bs
C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"XML::CanonicalizeXML\", 'DLBASE' => 'CanonicalizeX
ML', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"

dlltool --def CanonicalizeXML.def --output-exp dll.exp
g++ -o blib\arch\auto\XML\CanonicalizeXML\CanonicalizeXML.dll -Wl,--base-file -W
l,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Cano
nicalizeXML.o  canon/libcanon.a C:\strawberry\perl\lib\CORE\libperl516.a -lmoldn
ame -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole
32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbc
cp32 -lcomctl32 dll.exp
CanonicalizeXML.o:CanonicalizeXML.c:(.text+0x118): undefined reference to `xmlIn
itParser'
CanonicalizeXML.o:CanonicalizeXML.c:(.text+0x15c): undefined reference to `xmlSt
rlen'
CanonicalizeXML.o:CanonicalizeXML.c:(.text+0x189): undefined reference to `_imp_
_xmlFree'
CanonicalizeXML.o:CanonicalizeXML.c:(.text+0x190): undefined reference to `xmlCl
eanupParser'
canon/libcanon.a(canon.o):canon.c:(.text+0x27): undefined reference to `xmlStrle
n'
canon/libcanon.a(canon.o):canon.c:(.text+0x35): undefined reference to `_imp__xm
lMalloc'
canon/libcanon.a(canon.o):canon.c:(.text+0xb3): undefined reference to `xmlParse
Memory'
canon/libcanon.a(canon.o):canon.c:(.text+0xc4): undefined reference to `__xmlLoa
dExtDtdDefaultValue'
canon/libcanon.a(canon.o):canon.c:(.text+0xd6): undefined reference to `xmlSubst
ituteEntitiesDefault'
canon/libcanon.a(canon.o):canon.c:(.text+0xf2): undefined reference to `xmlParse
Memory'
canon/libcanon.a(canon.o):canon.c:(.text+0x104): undefined reference to `xmlDocG
etRootElement'
canon/libcanon.a(canon.o):canon.c:(.text+0x13a): undefined reference to `xmlStrE
qual'
canon/libcanon.a(canon.o):canon.c:(.text+0x146): undefined reference to `xmlNode
GetContent'
canon/libcanon.a(canon.o):canon.c:(.text+0x15e): undefined reference to `xmlXPat
hNewContext'
canon/libcanon.a(canon.o):canon.c:(.text+0x194): undefined reference to `xmlXPat
hRegisterNs'
canon/libcanon.a(canon.o):canon.c:(.text+0x1ca): undefined reference to `_imp__x
mlFree'
canon/libcanon.a(canon.o):canon.c:(.text+0x1d4): undefined reference to `xmlXPat
hFreeContext'
canon/libcanon.a(canon.o):canon.c:(.text+0x1dc): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x1e4): undefined reference to `_imp__x
mlRealloc'
canon/libcanon.a(canon.o):canon.c:(.text+0x238): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x27d): undefined reference to `xmlXPat
hEvalExpression'
canon/libcanon.a(canon.o):canon.c:(.text+0x28d): undefined reference to `_imp__x
mlFree'
canon/libcanon.a(canon.o):canon.c:(.text+0x2a2): undefined reference to `xmlXPat
hFreeContext'
canon/libcanon.a(canon.o):canon.c:(.text+0x2aa): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x2db): undefined reference to `xmlC14N
DocDumpMemory'
canon/libcanon.a(canon.o):canon.c:(.text+0x2e7): undefined reference to `xmlXPat
hFreeObject'
canon/libcanon.a(canon.o):canon.c:(.text+0x2f3): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x301): undefined reference to `xmlMemo
ryDump'
canon/libcanon.a(canon.o):canon.c:(.text+0x393): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x435): undefined reference to `xmlFree
Doc'
canon/libcanon.a(canon.o):canon.c:(.text+0x46e): undefined reference to `_imp__x
mlFree'
canon/libcanon.a(canon.o):canon.c:(.text+0x478): undefined reference to `xmlFree
Doc'
collect2: ld returned 1 exit status
dmake.exe:  Error code 129, while making 'blib\arch\auto\XML\CanonicalizeXML\Can
onicalizeXML.dll'
  SJZASADA/XML-CanonicalizeXML-0.05.tgz
  C:\strawberry\c\bin\dmake.exe -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'XML::CanonicalizeXML'.
Failed during this command:
 SJZASADA/XML-CanonicalizeXML-0.05.tgz        : make NO

XML::CanonicalizeXML
模块依赖于
libxml2
。由于
xml2 config
是一个
libxml2
命令,看起来您的
libxml2
安装不正确或根本没有安装。
XML::CanonicalizeXML
模块取决于
libxml2
。由于
xml2 config
是一个
libxml2
命令,看起来您的
libxml2
安装不正确或根本没有安装。

它缺少所需的可执行文件。找出
xml2 config
程序安装(或放置)的位置,以及它缺少所需的可执行文件。找出
xml2 config
程序安装(或放置)的位置,

问题在于CPAN只下载了需要用Windows批处理文件替换的UNIX Shell脚本版本的xml2 config。如果其他人需要,请点击此处:

@ECHO OFF

setlocal ENABLEDELAYEDEXPANSION
rem http://batcheero.blogspot.co.il/2007/06/how-to-enabledelayedexpansion.html - windows xp

SET SELFDIR=%~dp0
IF %SELFDIR:~-1%==\ SET SELFDIR=%SELFDIR:~0,-1%
set SELFDIR=%SELFDIR:\=/%

set prefix=%SELFDIR%
set exec_prefix=%prefix%
set includedir=%prefix%/include
set libdir=%exec_prefix%/lib

IF "%1"=="" GOTO usage0

rem whats the point of resettingthes flags...
rem set cflags=false
rem set libs=false

:loop

    IF "%1"=="" Exit /B 0

    IF "%1"=="--version" (
    echo 2.4.12
    Exit /B 0
    )

    IF "%1"=="--help" (
          GOTO usage0
    )

    rem the code below does: if next arg is not any known argument nor empty then the next arg is prefix value otherwise print the prefix
    IF "%1"=="--prefix" ( 
          IF "%2"=="" ( SHIFT
                        echo %prefix%) ELSE (
            IF "%2"=="--cflags" ( SHIFT
                                  echo %prefix% ) ELSE (
              IF "%2"=="--libs" ( SHIFT
                                  echo %prefix%) ELSE (
                IF "%2"=="--prefix" ( SHIFT
                                      echo %prefix%) ELSE (
                 SET /A prefix=%2
                 set exec_prefix=!prefix!
                 set includedir=!prefix!/include
                 set libdir=!exec_prefix!/lib
                 SHIFT
                 SHIFT
                )
              )
            )
          )
    )

    IF "%1"=="--cflags" (

        echo -I!includedir!/libxml2/libxml -I!includedir!/libxml2 
    SHIFT
    )

    IF "%1"=="--libs" (
        echo -L!libdir! -lxml2 -lz  -liconv -lm -Wl,-s -lwsock32 -liberty -lMsup -lMstubs 
    SHIFT
    )


    GOTO :loop

Exit /B 1


:usage0

echo Usage: xml-config [OPTION]
echo _
echo Known values for OPTION are:
echo _
echo   --prefix=DIR     change libxml prefix [default $prefix]
echo   --libs       print library linking information
echo   --cflags     print pre-processor and compiler flags
echo   --help       display this help and exit
echo   --version        output version information
Exit /B 0

:usage1

echo Usage: xml-config [OPTION]
echo _
echo Known values for OPTION are:
echo _
echo   --prefix=DIR     change libxml prefix [default $prefix]
echo   --libs       print library linking information
echo   --cflags     print pre-processor and compiler flags
echo   --help       display this help and exit
echo   --version        output version information
Exit /B 1

问题是CPAN只下载了需要用Windows批处理文件替换的UNIX Shell脚本版本的xml2配置。如果其他人需要,请点击此处:

@ECHO OFF

setlocal ENABLEDELAYEDEXPANSION
rem http://batcheero.blogspot.co.il/2007/06/how-to-enabledelayedexpansion.html - windows xp

SET SELFDIR=%~dp0
IF %SELFDIR:~-1%==\ SET SELFDIR=%SELFDIR:~0,-1%
set SELFDIR=%SELFDIR:\=/%

set prefix=%SELFDIR%
set exec_prefix=%prefix%
set includedir=%prefix%/include
set libdir=%exec_prefix%/lib

IF "%1"=="" GOTO usage0

rem whats the point of resettingthes flags...
rem set cflags=false
rem set libs=false

:loop

    IF "%1"=="" Exit /B 0

    IF "%1"=="--version" (
    echo 2.4.12
    Exit /B 0
    )

    IF "%1"=="--help" (
          GOTO usage0
    )

    rem the code below does: if next arg is not any known argument nor empty then the next arg is prefix value otherwise print the prefix
    IF "%1"=="--prefix" ( 
          IF "%2"=="" ( SHIFT
                        echo %prefix%) ELSE (
            IF "%2"=="--cflags" ( SHIFT
                                  echo %prefix% ) ELSE (
              IF "%2"=="--libs" ( SHIFT
                                  echo %prefix%) ELSE (
                IF "%2"=="--prefix" ( SHIFT
                                      echo %prefix%) ELSE (
                 SET /A prefix=%2
                 set exec_prefix=!prefix!
                 set includedir=!prefix!/include
                 set libdir=!exec_prefix!/lib
                 SHIFT
                 SHIFT
                )
              )
            )
          )
    )

    IF "%1"=="--cflags" (

        echo -I!includedir!/libxml2/libxml -I!includedir!/libxml2 
    SHIFT
    )

    IF "%1"=="--libs" (
        echo -L!libdir! -lxml2 -lz  -liconv -lm -Wl,-s -lwsock32 -liberty -lMsup -lMstubs 
    SHIFT
    )


    GOTO :loop

Exit /B 1


:usage0

echo Usage: xml-config [OPTION]
echo _
echo Known values for OPTION are:
echo _
echo   --prefix=DIR     change libxml prefix [default $prefix]
echo   --libs       print library linking information
echo   --cflags     print pre-processor and compiler flags
echo   --help       display this help and exit
echo   --version        output version information
Exit /B 0

:usage1

echo Usage: xml-config [OPTION]
echo _
echo Known values for OPTION are:
echo _
echo   --prefix=DIR     change libxml prefix [default $prefix]
echo   --libs       print library linking information
echo   --cflags     print pre-processor and compiler flags
echo   --help       display this help and exit
echo   --version        output version information
Exit /B 1

我已经从中下载了它,并将内容复制到我的草莓/c/目录,自述文件说它不需要任何特殊安装。这是一个奇怪的地方。无论如何,相同的
readme
文件会说“…如果希望从命令行运行提供的实用程序,如果愿意,可以将XML::CanonicalizeXML'bin'子目录添加到PATH环境变量”。您不能只是将发行版转储到磁盘上的一个随机位置,然后期望它正常工作。模块安装尝试运行 XML2 CONFIG//C>,显然它找不到它。它不是一个随机的地方,在这里G++编译器是CPAN使用的,并且所有其他C++ LIBs都在这里。但我也在那里找到了xml2配置,它是一个unix shell脚本,在谷歌搜索之后,我找到了它的Windows bat文件版本,现在它可以工作了。我已经从草莓/c/目录下载了它,并将内容复制到我的草莓/c/目录,自述文件说它不需要任何特殊安装。这是一个奇怪的地方。无论如何,相同的
readme
文件会说“…如果希望从命令行运行提供的实用程序,如果愿意,可以将XML::CanonicalizeXML'bin'子目录添加到PATH环境变量”。您不能只是将发行版转储到磁盘上的一个随机位置,然后期望它正常工作。模块安装尝试运行 XML2 CONFIG//C>,显然它找不到它。它不是一个随机的地方,在这里G++编译器是CPAN使用的,并且所有其他C++ LIBs都在这里。但我也在那里找到了xml2配置,它是一个unix shell脚本,在谷歌搜索之后,我找到了它的Windows bat文件版本,现在它可以工作了。