[xsd-users] Double definitions when using DLLs
Gordan Sikic
gordan.sikic at uljanik.hr
Thu Jun 5 06:46:18 EDT 2014
For the sake of completeness:
We had same problem, but original suggestion to make one DLL "root" was
not an option.
On the other hand, we built and linked everything if instead of
exporting complete classes, member functions are exported (i.e.
decorated with dllimport/dllexport). All those linking problems wanished.
Of course, since it is automatically generated code, we were faced with
new problem, a new precompile step was needed, in order to rearrange
decorations. It was done using gccxml.
so there is definitely another way to solve the problem.
best regards,
Gordan
On 13.5.2014. 5:35, Boris Kolpackov wrote:
> Hi Alexander,
>
> alexander.gosling at kongsberg.com<alexander.gosling at kongsberg.com> writes:
>
>> Are there any plans to fix this more permanently?
>
> This is really a problem in the MS toolchain. Essentially, with VC++ it
> is impossible to derive from std::string if DLLs are used.
>
> Unfortunately there is no easy way to work around this problem from
> our side. The "permanent" way to fix this would be to stop deriving
> from std::string. But that would also remove fairly useful
> functionality: right now one can pass xml_schema::string (or any
> other string-based type) to an interface that expects std::string
> and everything will work out of the box. Removing this functionality
> for everyone just because Microsoft's toolchain is broken seems like
> a bad idea.
>
> Note also that it is already possible to customize the xs:string type
> and provide your own implementation without inheritance. Maybe providing
> a custom implementation like this and instructions that describe how to
> set everything up would be sufficient?
>
> Boris
>
>
The information in this email is confidential and it is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any distribution, copying, duplication or disclosure is prohibited and may be unlawful. If you have received this email in error, please notify the sender immediately and destroy it, and all copies of it.
Ova poruka je povjerljiva i namijenjena isključivo primateljima navedenim u zaglavlju iste. Svaki pristup, distribucija, umnožavanje ili otkrivanje sadržaja ove poruke trećim osobama strogo je zabranjeno i smatra se protuzakonitim. Ukoliko ste greškom dobili ovu poruku, molimo Vas da što prije obavijestite pošiljatelja poruke i uništite sve postojeće kopije.
More information about the xsd-users
mailing list