[xsd-users] Problem compiling cxx/tree/hello example for XSD 3.0.0 on Mac OS X (PowerPC)

Alan Chao alanchao at comcast.net
Sat Sep 22 15:25:49 EDT 2007


Hi,

I get the following error when executing

% g++ -I /Users/Shared/Tools/xerces-c_2_8_0/include -I../../../../ 
libxsd -W -Wall -c driver.cxx -o driver.o

in the examples/cxx/tree/hello directory:

../../../../libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:157: error:  
declaration of 'xsd::cxx::xml::dom::auto_ptr<X>::operator X*  
(xsd::cxx::xml::dom::auto_ptr<X>::*)()const() const'
../../../../libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:109: error: conflicts  
with previous declaration 'xsd::cxx::xml::dom::auto_ptr<X>::operator  
xsd::cxx::xml::dom::auto_ptr<Y>'
../../../../libxsd/xsd/cxx/xml/dom/auto-ptr.hxx: In instantiation of  
`xsd::cxx::xml::dom::auto_ptr<xercesc_2_8::DOMDocument>':
../../../../libxsd/xsd/cxx/tree/elements.hxx:539:   instantiated from  
here
../../../../libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:152: error:  
declaration of 'xsd::cxx::xml::dom::auto_ptr<X>::operator X*  
(xsd::cxx::xml::dom::auto_ptr<X>::*)()const() const [with X =  
xercesc_2_8::DOMDocument]'
../../../../libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:109: error: conflicts  
with previous declaration  
'xsd::cxx::xml::dom::auto_ptr<xercesc_2_8::DOMDocument>::operator  
xsd::cxx::xml::dom::auto_ptr<Y>'
make: *** [driver.o] Error 1

I'm using the binary distribution xsd-3.0.0-powerpc-macosx.tar.bz2  
with xerces-c-_2_8_0-powerpc-macosx-gcc_4_0.tar.gz downloaded from  
xml.apache.org. I'm using Apple's GNU compiler that came with OS X  
Tiger.

% g++ -v
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure -- 
disable-checking --prefix=/usr --mandir=/share/man --enable- 
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/ 
s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ -- 
build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- 
target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)

Please help. Thanks.

-Alan




More information about the xsd-users mailing list