Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 02-20-2003
Bruce's Avatar
Bruce Bruce is offline
Registered User
 
 
Join Date: Feb 2003
Location: Perth, Western Australia
Posts: 17
Thanks for the fix Derek.

I found I had to make the same fix to the following files to get it working:
src/IceSSL/ConfigParser.h
src/IceSSL/ConfigParserErrorReporter.h
src/IceStorm/Admin.cpp
src/IceStorm/WeightedGraph.cpp
src/IcePack/ComponentBuilder.h
src/IcePack/IcePackNode.cpp
src/IcePack/IcePackRegistry.cpp
src/XMLTransform/ErrorReporter.h
include/XMLTransform/XMLTransform.h

... but it is all working now and I have the hello demo working.
__________________
Bruce Fountain
Ice 1.2.0
OS=Redhat9
Compiler=gcc-3.2.2
Reply With Quote
  #3 (permalink)  
Old 02-20-2003
marlowa marlowa is offline
Registered User
 
 
Join Date: Feb 2003
Location: London
Posts: 64
Quote:
Originally posted by Bruce
Thanks for the fix Derek.

I found I had to make the same fix to the following files to get it working:
src/IceSSL/ConfigParser.h
src/IceSSL/ConfigParserErrorReporter.h
src/IceStorm/Admin.cpp
src/IceStorm/WeightedGraph.cpp
src/IcePack/ComponentBuilder.h
src/IcePack/IcePackNode.cpp
src/IcePack/IcePackRegistry.cpp
src/XMLTransform/ErrorReporter.h
include/XMLTransform/XMLTransform.h

... but it is all working now and I have the hello demo working.
I also found I had to include the header file XMLException.hpp in Validator.cpp.

Shouldn't the namespace fix just go into the cpp files, not the header files? Otherwise the headers have a side effect.

-apm
__________________
You are in a maze of twisty little passages, all different.
Reply With Quote
  #4 (permalink)  
Old 02-20-2003
dthomson dthomson is offline
Registered User
 
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 34
Quote:
Originally posted by marlowa

I also found I had to include the header file XMLException.hpp in Validator.cpp.

Shouldn't the namespace fix just go into the cpp files, not the header files? Otherwise the headers have a side effect.

-apm
That's right, but unfortunately some xerces identifiers are used in Ice header files. You could do something lam0r like requiring that the 'using namespace' declaration appear before each '#include' of an affected file, but that is bad practice as the include files aren't independently compilable any more.

The *best* way would be to fully qualify every single xerces identifer used in a header, but I just don't have time right now, and it's not going to affect my mucking about. I just wanted to build it! I'll leave such niceties to the good people at ZeroC

In short, stick to xerces 2.1.0 for now. I just like being on the bleeding edge

Regards,
Derek.
Reply With Quote
  #5 (permalink)  
Old 02-20-2003
Colin Adams Colin Adams is offline
Registered User
 
 
Join Date: Feb 2003
Location: Preston, Lancs. England
Posts: 6
Xerces 2.1.0 is no good - it is far too buggy (I had to fix some bugs myself). 2.2.0 is live now, so can we please have a fix to use it?
Reply With Quote
  #6 (permalink)  
Old 02-20-2003
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,780
Quote:
Originally posted by Colin Adams
Xerces 2.1.0 is no good - it is far too buggy (I had to fix some bugs myself). 2.2.0 is live now, so can we please have a fix to use it?
We port Ice to xerces 2.2.0 as we speak (or write?).
Reply With Quote
  #7 (permalink)  
Old 02-25-2003
Colin Adams Colin Adams is offline
Registered User
 
 
Join Date: Feb 2003
Location: Preston, Lancs. England
Posts: 6
Unhappy

Yes it works now, but the Make.rules file is a bit mis-leading on this. The standard place to find Xerces-c is the directory pointed to by the XERCESCROOT environment variable. A comment in the Make.rules file to say that this is not used might help.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
linktime error from xerces 2.1 marlowa Help Center 4 02-28-2003 11:05 AM


All times are GMT -4. The time now is 08:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.