xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Pierce" <jpie...@nyc.rr.com>
Subject Bugs and Compile Problems in 1.4.0
Date Sat, 03 Feb 2001 14:25:35 GMT

I accidently sent this message while I was writing it before it was complete so please ignore
the incomplete one if you got it more than once.
I also needed to repost it since I didn't recieve it back and wasn't sure if it reached the

I just downloaded my first version of Xerces-C version 1.4.0 and tried to build it with my
favorite non-supported xerces compiler.

 I encountered several compile problems that identified what I believe are errors in the source
 Since I am using a stricter compiler, my make process is more sensitive to issues that may
be hidden by the supported compiler list. 
 If anyone cares, I am using CodeWarrior 6 on Windows.

Here are the changes that I needed to make to the code to get it to compile. Please comment
on these issues and incorporate the changes into the release if you
have committer status.

I have not had a chance to see if any of these things were fixed in the nightly xml-xerces
2.0 code tree. Please look for similar problems there if it is a seperate code base. 
I will try to build it once I get this release working and send additional feedback to this

Thanks everyone for considering these issues.

Jonathan Pierce
Jungle Creatures, Inc.

1. There were some references to strings.h and memory.h in the platform independant source
These includes should be moved to the platform specific build files or the sources moved to
platform specific directories.

1.1 #include <strings.h> should be removed from /src/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp
1.2 #include <memory.h> should be removed from /src/validators/DTD/CMStateSet.hpp

2. The class name in /src/dom/MemDebug.hpp is in the wrong case on line 77
//class DomMemDebug
class DOMMemDebug

3. . I made the following changes to: /src/dom/NameNodeFilter.hpp
3.1 The /src/dom/NameNodeFilter.hpp includes non-existent file: "NodeFilterImpl.hpp" so I
had to remove it.
3.2 I also had to redefine the class to not include the non-existent superclass interface.

class CDOM_EXPORT NameNodeFilter 
 // : public NodeFilterImpl

4. Many of the .hpp files were missing the required /src/util/XercesDefs.hpp include file
so I had to add it since they may refer to
 #defines such as XMLPARSER_EXPORT, XERCES_TMPLSINC, etc before they have been defined. 
 The build process should not depend on specifying a precompiled header to be included automatically
in all files.

I needed to add #include <util/XercesDefs.hpp> to the following files:

4.1 /src/framework/XMLPScanToken.hpp 
4.2 /src/framework/XMLRecognizer.hpp 
4.3 /src/internal/CharTypeTables.hpp 
4.4 /src/internal/EndOfEntityException.hpp 
4.5 /src/sax/DTDHandler.hpp
4.5 /src/util/CountedPointer.c
4.5 /src/util/FlagJanitor.c
4.6 /src/util/Janitor.c
4.7 /src/util/KeyValuePair.c
4.8 /src/util/NameIdPool.c
4.9 /src/util/RefArrayOf.c
4.10 /src/util/RefHashTableOf.c
4.11 /src/util/RefStackOf.c
4.12 /src/util/RefVectorOf.c
4.13 /src/util/TransENameMap.c
4.14 /src/util/ValueArrayOf.c
4.15 /src/util/ValueStackOf.c
4.16 /src/util/ValueVectorOf.c
4.17 /src/util/XMLDeleterFor.c
4.18 /src/util/ValueVectorOf.c

5. I needed to explicitly include /util/XMLString.hpp in /src/framework/XMLRefInfo.hpp since
it references XMLString::replicate

6. I made the following changes to: /src/util/Compilers/CodeWarriorDefs.hpp

6.1 Added #define XML_LSTRSUPPORT
6.2 Added #define XERCES_TMPLSINC
6.3 Needed to change the following line so I could precompile the header.

//const char* const Xerces_DLLName = "xerces-c" Xerces_DLLVersionStr;
#define Xerces_DLLName = "xerces-c" + Xerces_DLLVersionStr

7. I replaced the contents of /src/util/NoDefTranscoderException.cpp with the Macro call defined
in XMLException.hpp 
This was necessary because the explicit definition neglected to implement the required getType
method and prevented the  duplicate method from compiling since
the resulting class would be abstract and cannot be instantiated without the required getType
method implementation.


 #include <util/XercesDefs.hpp>
#include <util/XMLException.hpp>
MakeXMLException(NoDefTranscoderException, XMLUTIL_EXPORT)

8. I needed to change the way gXercesVersionStr and gXercesFullVersionStr were defined in
so that I could include them in my precompiled header which does not support the contain the
const strings.

//const char* const    gXercesVersionStr = "1_4";
//const char* const    gXercesFullVersionStr = "1_4_0";
#define gXercesVersionStr "1_4"
#define gXercesFullVersionStr "1_4_0"

9. I needed to add the following to /src/util/XMLUni.cpp to support the change above in #7
that uses the XMLException macro to define the NoDefTranscoderExceptionClass.

const XMLCh XMLUni::fgNoDefTranscoderException_Name[] =
        chLatin_N, chLatin_o, chLatin_D, chLatin_e, chLatin_f, chLatin_T
    ,   chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_c, chLatin_o
    ,   chLatin_d, chLatin_e, chLatin_r
    , chLatin_E, chLatin_x, chLatin_c, chLatin_e, chLatin_p, chLatin_t
    ,   chLatin_i, chLatin_o, chLatin_n, chNull

10.  I needed to add the following to /src/util/XMLUni.hpp to support the change above in
#7 that uses the XMLException macro to define the NoDefTranscoderExceptionClass.
 static const XMLCh fgNoDefTranscoderException_Name[];

View raw message