2012-01-10 29 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