我编译了xerces-c-2.7.0并在XML-Xerces-2.7.0目录中运行了perl Makefile.PL
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
感谢您的帮助!
答案 0 :(得分:2)
在构建Xerces perl模块时需要重新构建swig绑定,以便使用perl 5.8.9或更高版本构建模块。
为此,请确保已安装swig(从源代码构建或为系统安装软件包)并将XERCES_DEVEL环境变量设置为1.如果您使用的是bash:
export XERCES_DEVEL=1
然后按常规做法:
perl Makefile.PL
make
make install
当你运行make时,它将使用swig重新生成绑定,你将全部设置好。