[xsd-users] DLL's VS 2010 and dllexport problems revisited

Gordan Sikic gordan.sikic at uljanik.hr
Tue May 29 03:48:26 EDT 2012


Hi Boris,

thanks for your answer,

> It would be helpful to have more details on this.

It is the similar problem as explained in "2010-september" thread. There
are couple of mutually unrelated schemas, and every schema is compiled
into one dll. On many places in schemas, string enumerations are used,
and it turns out that resulting classes in c++ are inherited from
::xml_schema::string.

At the end, I have dependant dll that links all other dlls generated
from xsd schemas. Link stage of this dependant dll reports problem.

I have tried to compile minimal example, but it doesn't trigger the
problem, so I posted the question without it. Maybe you can (if
possible) send me example that is used in thread you refer to, so I can
check it as well?

 > Generally, if followed correctly, this approach works. Here is the
 > list of steps that you need to take:
>
> http://www.codesynthesis.com/pipermail/xsd-users/2010-September/003011.html

I tried it (and followed it correctly), more than once. I've been
dealing with this problem for a couple of weeks now, and before posting
I made sure that all other possibilities are already explored and checked.


>> I would like to ask is there possibility to automatically add this
>> function decoration during parsing XSD schema?
>
> I am pretty sure we won't be able to do this for built-in types which
> are class templates. What's exported in their case are template
> instantiations (using the "template class EXPORT_MACROS foo<bar>;"

Maybe I was little bit vague in my explanation. When I wrote
automatically, I did not mean obligatory, just possibly, as some kind of
command line option (some kind of regex?).

I don't want to export types "per se", I don't need it. I want to export
member functions of generated classes only.

> syntax). Maybe it is possible to instantiate and export individual
> member functions this way but we definitely don't want to go that
> route (there will be hundreds of them).

Ok, I understand that it is not route you are willing to take.
I would just like to ask why do you think it is a problem to have
hundreds of export macros within class, after all, it is automatically
generated code?


once more,
thanks for you answers,

cheers,
Gordan


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