You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by Davenport Todd S GS-12 96 CG/SCTOA <To...@eglin.af.mil> on 2003/05/14 22:32:59 UTC

RE: PerlContentCallbackHandler.hpp:27: parse error before `&' tok en

A common error message.  The solutions I've found:

1) Try using SWIG (I've never done this, YMMV)

2) Follow below instructions exactly.  Note that the versions of the various
libraries are important.  It works with these exact version numbers but
deviations sometimes cause the error you're getting.

1. gunzip xerces-c-src2_0_0.tar.gz

2. tar xf xerces-c-src2_0_0.tar

3. cd xerces-c-src2_0_0 ; export XERCESCROOT=`pwd`

4. cd to src/xercesc

5. run `autoconf`

6. run `./runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative
-rpthread`

7. run `gmake`

8. run `gmake install`

9. Installs libxerces-c.so.20.0 to /usr/local/lib.  You must cd to this dir
and
   ln -s libxerces-c.so.20.0 libxerces-c.so
   ln -s libxerces-c.so.20.0 libxerces-c.so.20

Install xerces-p

1. gunzip XML-Xerces-2.0.0-3.tar.gz

2. tar xf XML-Xerces-2.0.0-3.tar

3. export XERCES_LIB=/usr/local/lib

4. export XERCES_INCLUDE=/usr/local/include/xercesc

5. perl Makefile.PL

6. make

7. make install


Test your install with:

perl -e 'use XML::Xerces;'
perl -e 'use XML::Xerces; $x=XML::Xerces::XercesDOMParser->new()'

****************************
Todd S. Davenport
96 CG/SCTOA
Eglin AFB, FL
COM: (850) 882-5498
DSN: 872-5498
todd.davenport@eglin.af.mil
****************************

-----Original Message-----
From: David Link [mailto:dvlink@yahoo.com] 
Sent: Tuesday, May 13, 2003 1:13 PM
To: xerces-p-dev@xml.apache.org
Subject: PerlContentCallbackHandler.hpp:27: parse error before `&' token


RedHat 8
xerces-C 2.2.0

Make fails ... (thanks for any help on this..)

$ make
make -C Handler static
make[1]: Entering directory
`/data/software/xml-xerces/XML-Xerces-2.0.0-3/Handler'
gcc -c  -I. -IHandler -I/usr/include/xerces -D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -march=i386 -mcpu=i686   -DVERSION=\"\"
-DXS_VERSION=\"\" -fpic
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"  
PerlContentCallbackHandler.cpp
In file included from PerlContentCallbackHandler.hpp:4,
                 from PerlContentCallbackHandler.cpp:2:
PerlCallbackHandler.hpp:51:8: warning: extra tokens at end of #endif
directive In file included from PerlContentCallbackHandler.cpp:2:
PerlContentCallbackHandler.hpp:10: base class `ContentHandler' has
incomplete 
   type
PerlContentCallbackHandler.hpp:27: parse error before `&' token
PerlContentCallbackHandler.hpp:40: parse error before `*' token
PerlContentCallbackHandler.cpp:40: parse error before `&' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::startElement(...)':
PerlContentCallbackHandler.cpp:54: `XMLString' undeclared (first use this 
   function)
PerlContentCallbackHandler.cpp:54: (Each undeclared identifier is reported
only 
   once for each function it appears in.)
PerlContentCallbackHandler.cpp:54: parse error before `::' token
PerlContentCallbackHandler.cpp:60: parse error before `::' token
PerlContentCallbackHandler.cpp:66: parse error before `::' token
PerlContentCallbackHandler.cpp:75: `attrs' undeclared (first use this
function)
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::endElement(const XMLCh*, const XMLCh*, const 
   XMLCh*)':
PerlContentCallbackHandler.cpp:106: parse error before `::' token
PerlContentCallbackHandler.cpp:112: parse error before `::' token
PerlContentCallbackHandler.cpp:118: parse error before `::' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::characters(const XMLCh*, unsigned int)':
PerlContentCallbackHandler.cpp:152: parse error before `::' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::ignorableWhitespace(const XMLCh*, unsigned 
   int)':
PerlContentCallbackHandler.cpp:186: parse error before `::' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::processingInstruction(const XMLCh*, const 
   XMLCh*)':
PerlContentCallbackHandler.cpp:286: parse error before `::' token
PerlContentCallbackHandler.cpp:292: parse error before `::' token
PerlContentCallbackHandler.cpp: At global scope:
PerlContentCallbackHandler.cpp:310: parse error before `*' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::setDocumentLocator(...)':
PerlContentCallbackHandler.cpp:327: `locator' undeclared (first use this 
   function)
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::startPrefixMapping(const XMLCh*, const
XMLCh*)':
PerlContentCallbackHandler.cpp:353: parse error before `::' token
PerlContentCallbackHandler.cpp:359: parse error before `::' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::endPrefixMapping(const XMLCh*)':
PerlContentCallbackHandler.cpp:391: parse error before `::' token
PerlContentCallbackHandler.cpp: In member function `void 
   PerlContentCallbackHandler::skippedEntity(const XMLCh*)':
PerlContentCallbackHandler.cpp:422: parse error before `::' token
make[1]: *** [PerlContentCallbackHandler.o] Error 1
make[1]: Leaving directory
`/data/software/xml-xerces/XML-Xerces-2.0.0-3/Handler'
make: *** [blib/arch/auto/Handler/Handler.a] Error 2


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org