View Single Post
  #1 (permalink)  
Old 02-19-2003
dthomson dthomson is offline
Registered User
 
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 34
Validate.cpp doesn't compile against xerces 2.2.0

Hi,

Yes, I realize that the install guide specified xerces 2.1.0, but if I'm going to be downloading 6MB, I'll be getting the latest

Also, this might not be due to the version difference, but the way your xerces is configured compared to mine.

Anyway, the problem is that in my xerces build, namespaces are required for all xerces types. This means that src/slice2xsd/Validate.cpp will currently fail to build.

What I did was to put "XERCES_CPP_NAMESPACE_USE" one line beneath "using namespace std;". This is a xerces macro that expands to the correct "using namespace" statement for xerces, but only if xerces was configured to use namespaces.

It built okay after that!

This is on SuSE 8.0, on a Pentium box, with gcc 3.2.1.

Here's the first part of the compiler error report:

Code:
c++ -c -I. -I../../include  -I/home/derekt/e2fsprogs-1.32/lib  -g -ftemplate-depth-128 -fPIC -Wall Validate.cpp
Validate.cpp: In function `std::string toString(const XMLCh*)':
Validate.cpp:36: `XMLString' undeclared (first use this function)
Validate.cpp:36: (Each undeclared identifier is reported only once for each 
   function it appears in.)
Validate.cpp:36: parse error before `::' token
Validate.cpp: At global scope:
Validate.cpp:43: parse error before `{' token
Validate.cpp:51: parse error before `&' token
... and it goes on like this.

Regards,
Derek.

PS. I am not a crackpot!
Reply With Quote