2012-01-10 28 views
3

我编的Xerces-C-2.7.0,并在跑的perl Makefile.PL XML-的Xerces-2.7.0目录错误编译XML:Xerces的-2.7.0

Comiple XML:使用gmake命令和GOR的Xerces以下错误:

> Blockquote 

<br>make[1]: Entering directory `/home/czhang/XML_Xerces-2.7.0/Handler'</br> 
<br>make[1]: Leaving directory `/home/czhang/XML_Xerces-2.7.0/Handler'</br> 
<br>g++ -c -I. -IHandler -I/home/czhang/xerces-c-src_2_7_0/include -w -DNDEBUG </br><br>-DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS <br>-DXML_USE_NETACCESSOR_SOCKET -D_REENTRANT -DDEBIAN -D_GNU_SOURCE -O <br>-DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -fPIC "-I/usr/lib/perl5/5.14.2/i586-linux-thread-multi/CORE" Xerces.cpp </br> 

<br>Xerces.cpp:1219:9: error: expected unqualified-id before string constant</br> 
<br>Xerces.cpp:1220:9: error: ‘SwigPerlWrapper’ does not name a type</br> 
<br>Xerces.cpp:1225:3: error: ‘SwigPerlWrapperPtr’ does not name a type</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp:69331:1: error: too many initializers for ‘swig_command_info’</br> 
<br>Xerces.cpp: In function ‘void boot_XML__Xerces(PerlInterpreter*, CV*)’:</br> 
<br>Xerces.cpp:69557:5: error: ‘struct swig_command_info’ has no member named ‘wrapper’ 
<br>gmake: *** [Xerces.o] Error 1</br> 

> Blockquote 

感谢您的任何帮助!

回答

2

您需要在构建Xerces perl模块时重新构建swig绑定,以便使用perl 5.8.9或更高版本构建模块。

要做到这一点,请确保您已安装痛饮(从源代码编译或安装包为您的系统)和XERCES_DEVEL环境变量设置为1。如果你正在使用bash:

export XERCES_DEVEL=1 

然后做通常情况下:

perl Makefile.PL 
make 
make install 

当你运行make时,它会使用swig来重新生成绑定,你将全部设置。

+0

假设'XML :: Xerces'已经在2.7.0版本中死了是否安全? – 2013-09-13 21:37:21