need help on virtual class

Dear C/g++ experts:

in the process of installing/building path1.2r2, at make stage, I get compile
error about errors:
conflicting return type
overriding 'virtual xercesc_3_1::DOMNode:NodeType xercesc_3_1::DOMNode:getNodeType() const'

plz help
and thanks a lot in advance, Eric(g++4.5.2) on linux2.6.38-10

g++ -c -DUNIX -Wall -ftemplate-depth-50 -O2 -I/home/eric/cppcookbook/ch14/download/libpathan-1.2/src/patches/Xerces2_1_0/src -I/usr/src -I/home/eric/cppcookbook/ch14/download/libpathan-1.2/src NamespaceAxis.cpp -fPIC -DPIC -o /home/eric/cppcookbook/ch14/download/libpathan-1.2/objs/.libs/NamespaceAxis.o
In file included from NamespaceAxis.cpp:8:0:

../interface/XPathNamespaceImpl.hpp:47:36: error: conflicting return type specified for 'virtual short int XPathNamespaceImpl::getNodeType() const'
/usr/include/xercesc/dom/DOMNode.hpp:252:33: error: overriding 'virtual xercesc_3_1::DOMNode::NodeType xercesc_3_1::DOMNode::getNodeType() const'


make[1]: *** [/home/eric/cppcookbook/ch14/download/libpathan-1.2/objs/NamespaceAxis.lo] Error 1
make[1]: Leaving directory `/home/eric/cppcookbook/ch14/download/libpathan-1.2/src/navigation'
make: *** [subdirs] Error 2
----------------------------
XPathNamespaceImpl.hpp
------------------------------
1
2
3
4
5
6
7
8
9
10
11
12
  // Declare functions from DOMNode.  They all must be implemented by this class
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*         appendChild(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *newChild) ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*         cloneNode(bool deep) const ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNamedNodeMap* getAttributes() const ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList*     getChildNodes() const ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*         getFirstChild() const ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*         getLastChild() const ;
    virtual const XMLCh*           getLocalName() const ;
    virtual const XMLCh*           getNamespaceURI() const ;
    virtual       XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*         getNextSibling() const ;
    virtual const XMLCh*           getNodeName() const ;
    virtual       short            getNodeType() const ; // this is line 47 

------------------------------------
DOMNode.hpp
-----------------------------------
1
2
3
4
5
    /**
     * An enum value representing the type of the underlying object.
     * @since DOM Level 1
     */
    virtual NodeType            getNodeType() const = 0; // this is line 252 

--------------------------------------------------------

One bottle has acid.
Another bottle has orange juice.
Drink the content of the bottle.
Last edited on
Topic archived. No new replies allowed.