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 Thomas Porschberg <th...@osp-dd.de> on 2003/09/25 08:48:05 UTC

build problem with icu

Hi,

I tried to build xerces_2_3_0 on a linux machine with icu 
support.
I use "gcc version 3.3 20030226".

I configured with:

runConfigure -plinux -cgcc -xg++ -minmem -nsocket -ticu -rpthread

and later get on compile error:

g++ -fPIC -DLINUX -D_REENTRANT -c -I/opt/software/xerces-c-src_2_3_0/include -w -O -DPROJ_XMLPARSER  -DPROJ_XMLUTIL  -DPROJ_PARSERS  -DPROJ_SAX4C  -DPROJ_SAX2  -DPROJ_DOM  -DPROJ_VALIDATORS -DXML_USE_ICU_TRANSCODER -I/opt/software/icu/include -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET     -o /opt/software/xerces-c-src_2_3_0/obj/LINUX/ICUTransService.o ICUTransService.cpp
ICUTransService.cpp:130: error: type specifier omitted for parameter
ICUTransService.cpp: In function `XMLCh* xercesc_2_3::convertToXMLCh(const 
   UChar*, xercesc_2_3::MemoryManager*)':
ICUTransService.cpp:134: error: parse error before `sizeof'
ICUTransService.cpp:135: error: conditional expression between distinct pointer 
   types `xercesc_2_3::MemoryManager*' and `XMLCh*' lacks a cast
ICUTransService.cpp:135: error: invalid conversion from `void*' to `XMLCh*'
gmake[2]: *** [ICUTransService.o] Fehler 1
gmake[2]: Leaving directory `/opt/software/xerces-c-src_2_3_0/src/xercesc/util/Transcoders/ICU'
gmake[1]: *** [transcoders] Fehler 2
gmake[1]: Leaving directory `/opt/software/xerces-c-src_2_3_0/src/xercesc/util'
gmake: *** [Util] Fehler 2

The relevant method is:

static XMLCh* convertToXMLCh( const UChar* const toConvert,
                            , MemoryManager* const manager = 0) //line 130
{
    const unsigned int srcLen = u_strlen(toConvert);
    XMLCh* retBuf = (manager)
        ? (XMLCh*) manager->allocate((srcLen+1) sizeof(XMLCh))
        : new XMLCh[srcLen + 1];

    XMLCh* outPtr = retBuf;
    const UChar* srcPtr = toConvert;
    while (*srcPtr)
        *outPtr++ = XMLCh(*srcPtr++);
    *outPtr = 0;

    return retBuf;
}

Knows anybody a quick way out ?


Thomas

 

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

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


Re: build problem with icu

Posted by Gareth Reakes <ga...@decisionsoft.com>.

this is fixed in cvs.

On Thu, 25 Sep 2003, Thomas Porschberg wrote:

> The problem was the two comma before the second parameter
> of the method. Problem solved.
> Thomas
> 
> On Thu, Sep 25, 2003 at 10:01:31AM +0200, Alberto Massari wrote:
> > At 08.48 25/09/2003 +0200, Thomas Porschberg wrote:
> > >Hi,
> > >
> > >[...]
> > >
> > >static XMLCh* convertToXMLCh( const UChar* const toConvert,
> > >                            , MemoryManager* const manager = 0) //line 130
> > >{
> > >    const unsigned int srcLen = u_strlen(toConvert);
> > >    XMLCh* retBuf = (manager)
> > >        ? (XMLCh*) manager->allocate((srcLen+1) sizeof(XMLCh))
> > 
> > I guess it's missing a "*" before sizeof(XMLCh)
> > 
> > Alberto 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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


Re: build problem with icu

Posted by Thomas Porschberg <th...@osp-dd.de>.
The problem was the two comma before the second parameter
of the method. Problem solved.
Thomas

On Thu, Sep 25, 2003 at 10:01:31AM +0200, Alberto Massari wrote:
> At 08.48 25/09/2003 +0200, Thomas Porschberg wrote:
> >Hi,
> >
> >[...]
> >
> >static XMLCh* convertToXMLCh( const UChar* const toConvert,
> >                            , MemoryManager* const manager = 0) //line 130
> >{
> >    const unsigned int srcLen = u_strlen(toConvert);
> >    XMLCh* retBuf = (manager)
> >        ? (XMLCh*) manager->allocate((srcLen+1) sizeof(XMLCh))
> 
> I guess it's missing a "*" before sizeof(XMLCh)
> 
> Alberto 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

-- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

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


Re: build problem with icu

Posted by Alberto Massari <am...@progress.com>.
At 08.48 25/09/2003 +0200, Thomas Porschberg wrote:
>Hi,
>
>[...]
>
>static XMLCh* convertToXMLCh( const UChar* const toConvert,
>                             , MemoryManager* const manager = 0) //line 130
>{
>     const unsigned int srcLen = u_strlen(toConvert);
>     XMLCh* retBuf = (manager)
>         ? (XMLCh*) manager->allocate((srcLen+1) sizeof(XMLCh))

I guess it's missing a "*" before sizeof(XMLCh)

Alberto 



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