You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/09/13 16:56:37 UTC

[jira] Resolved: (XERCESC-1272) RefArrayOf.c compiler error with g++ 3.4

Message:

   The following issue has been resolved as DUPLICATE.

   Resolver: Alberto Massari
       Date: Mon, 13 Sep 2004 7:54 AM

Duplicate of #1208 (http://issues.apache.org/jira/browse/XERCESC-1208)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1272

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1272
    Summary: RefArrayOf.c compiler error with g++ 3.4
       Type: Bug

     Status: Resolved
   Priority: Minor
 Resolution: DUPLICATE

    Project: Xerces-C++
 Components: 
             Build
   Versions:
             2.5.0

   Assignee: 
   Reporter: Kathryn Hogg

    Created: Mon, 13 Sep 2004 7:22 AM
    Updated: Mon, 13 Sep 2004 7:54 AM
Environment: Fedora Core 2, runConfigure -x g++34 -x gcc -plinux -P/usr

Description:
When compiling with g++ 3.4, I get the following compiler error:

g++34 -fPIC -DLINUX -D_REENTRANT -c -I/users/kjh/xerces-c-src_2_5_0/include -w -O -DPROJ_XMLPARSER  -DPROJ_XMLUTIL  -DPROJ_PARSERS  -DPROJ_SAX4C  -DPROJ_SAX2  -DPROJ_DOM  -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET     -o /users/kjh/xerces-c-src_2_5_0/obj/LINUX/DOMAttrImpl.o DOMAttrImpl.cpp
In file included from /users/kjh/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.hpp:221,
                 from DOMDocumentImpl.hpp:73,
                 from DOMAttrImpl.hpp:77,
                 from DOMAttrImpl.cpp:64:
/users/kjh/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In constructor `xercesc_2_5::RefArrayOf<TElem>::RefArrayOf(unsigned int, xercesc_2_5::MemoryManager*)':
/users/kjh/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:117: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
/users/kjh/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'

**** rest of compiler messages are snipped ****

The culprit is src/xercesc/util/RefArrayOf.c which tries to use an instance of MemoryManager even though it has only seen a forward declaration of 'class MemoryManager'.   My workaround (which may not be optimal since I'm new to xerces c++) is to include the appropriate header file in RefArrayOf.cpp.

# diff -u RefArrayOf.c.orig RefArrayOf.c
--- RefArrayOf.c.orig   2004-09-13 09:04:26.981696489 -0500
+++ RefArrayOf.c        2004-09-13 09:19:55.597233528 -0500
@@ -94,6 +94,8 @@
 #if defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefArrayOf.hpp>
 #endif
+#include <xercesc/framework/MemoryManager.hpp>
+
 XERCES_CPP_NAMESPACE_BEGIN
  
 // ---------------------------------------------------------------------------





---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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