[xsd-users] Shared library and exported symbols problem

Klaim - Joël Lamotte mjklaim at gmail.com
Tue Jun 28 19:12:12 EDT 2011


I just figured I answered privately instead of to the public list, fixing
that

2011/6/28 Boris Kolpackov <boris at codesynthesis.com>

> Hi Joėl,
>
> Klaim - Joėl Lamotte <mjklaim at gmail.com> writes:
>
> > It seems that std::string is exported while it shouldn't be.
>
> In a nutshell, VC++ automatically exports base classes if the derived
> class is exported. Some built-in and generated types may derive,
> directly or indirectly, from std::string which can cause this problem.
>
> The thread that starts from this post discuses this issue in detail:
>
> http://www.codesynthesis.com/pipermail/xsd-users/2010-September/003010.html
>
> This post provides the instructions for how to resolve it:
>
> http://www.codesynthesis.com/pipermail/xsd-users/2010-September/003011.html
>
> Boris
>


Thanks Boris, that explains the problem.

Now, I'm not sure I've understood all the solutions but in a nutshell I have
almost the right configuration to make it work :

# We need to add export/import symbols to make it a dll
--export-xml-schema

# The export/import symbol to use
--export-symbol AOSLCPP_API

So it seems that now I just need to include xml-schema.hxx in all my cpp
files. Did I understood correctly?
(Sorry I can't check yet, I'm not home yet.)

Joël Lamotte

--------------------------------




2011/6/28 Klaim - Joël Lamotte <mjklaim at gmail.com>

> So it seems that now I just need to include xml-schema.hxx in all my cpp
> files. Did I understood correctly?
>
>
I tried to include xsd/cxx/parser/xml-schema.hxx in all generated cpp (in
doubt) but it generates exactly the same link error.
I also tried with all hpp but it fails too.

I'll search more see if something in the configuration makes things wrong.

Joël


More information about the xsd-users mailing list