[xsd-users] XSD Serialization problem - xml_schema:ostream not recognized in MinGW env

Jose jc.fernandez.navarro at gmail.com
Tue Oct 25 04:16:29 EDT 2011


Hi Boris,

Yep you are right, you a need third party XDR library. It is called
mingw32-portablexdr.

I was including the header but the problem was that when you cross compile
and/or compile under windows and you want to make use of XDR you have to
link
this library : libportablexdr.dll.a "in my case its this one cos I use
mingw"

So now when I cross compile it recognizes the schema the problem is that the
the xdr api that comes with MingGW is not compatible with the XDR api used
by XDS. Many names of variables are different or even not declared as well
as some headers of functions.

I don't know if this is a MinGW issue or XSD issue. Is XSD using the the
unix name sets of the XDR api in its Windows binary libraries in the file
xdr-stream-extraction and so on.

I can edit my xdr.h in mingw to be compatible to xsd but its not a nice
solution.

CDR would be more portable disregarding the ace library so I will see now
how long it will take me to change the schema in my parsing code.

Thanks

Jose

2011/10/24 Boris Kolpackov <boris at codesynthesis.com>

> Hi Jose,
>
> Jose <jc.fernandez.navarro at gmail.com> writes:
>
> >      std::auto_ptr< xml_schema::ostream<XDR> > oxdrp;
> >
> > It does compile perfectly under linux but it complains when I try to
> > cross-compile it with MinGW in Fedora.
>
> My first guess would be that the XDR API (<rpc/xdr.h> header) is not
> available on MinGW. For Windows it doesn't come standard and instead
> you need a third-party library that provides XDR support.
>
> If you want a more portable binary representation, then you may want
> to consider CDR (also supported out of the box by XSD). The drawback
> is that you will need build/install the ACE library.
>
> Boris
>


More information about the xsd-users mailing list