[xsd-users] xsd: cannot compile on HP-UX

Uri Karagila uri at hyperroll.com
Mon Sep 17 11:15:45 EDT 2007


Hi,

HP-UX C++ compiler aCC (HP ANSI C++ B3910B A.03.63)
does not compile xsd generated code even with "-AA" flag
because of some incompatibility (or extended usage?)
of auto_ptr<> template.

The same code compiles on Linux with g++ (4.1.1).

XSD of version 3.0.0.

Stripped example exists.

-----Original Message-----

From: Boris Kolpackov [mailto:boris at codesynthesis.com
<mailto:boris at codesynthesis.com> ]

Sent: Wed 9/5/2007 8:30 PM

To: Uri Karagila

Cc: xsd-users at codesynthesis.com

Subject: Re: [xsd-users] xsd: cannot compile on HP-UX

Hi Uri,

Uri Karagila <uri at hyperroll.com> writes:

> We used to compile with default settings (like with the "-AP" flag:

> Classic environment).

> 1. The XSD generated code cannot be compiled with this option, and our


> shared libraries become incompatible with 3rd party products that were


> build with "-AP" flag, too.

XSD generated code can be compiled with -AP if you add -Aa and use
STLPort for standard-conformant C++ standard library, as discussed on
this page:

http://wiki.codesynthesis.com/XSD/HP-UX_AP
<http://wiki.codesynthesis.com/XSD/HP-UX_AP> 

Note that you only need to add -Aa while compiling the generated code
and code that uses it.

 

> 2. When we've tried to compile the whole code with the "-AA" flag 

> (Standard environment), the XSD generated files could not be compiled.

That's strange. We test and make sure each release works with aCC3.

Which version of XSD are you using? If it's other than 2.3.1 or 3.0.0,
can your upgrade to either one of these and see if it makes a
difference.

 

> We absolutely do not want to use STLport product with "-Aa"

Unfortunately that's the only way to use XSD with aCC3 in "Classic mode"
(-AP). The problem with "Classic mode" is that the C++ Library provided
in this mode is nowhere close to the Standard C++, it has different
interfaces and is missing a lot of parts that XSD depends on. That is
why you need STLPort.

Also note that if you are using third-party libraries that were compiled
with -AP then all your code will have to be compiled with -AP.

Boris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hpux-xsd-aCC-auto_ptr.tar.Z
Type: application/x-compress
Size: 30720 bytes
Desc: hpux-xsd-aCC-auto_ptr.tar.Z
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070917/ba734e61/hpux-xsd-aCC-auto_ptr.tar.bin


More information about the xsd-users mailing list