[xsd-users] xml_schema::exception, linux, shared libraries, and visibility=hidden

Boris Kolpackov boris at codesynthesis.com
Wed Apr 21 17:55:04 EDT 2010


Hi Greg,

Greg Carter <greg at permedia.ca> writes:

> For the two xml libs, I compile with visibility=default, I did try  
> hidden, and the program ran and found all symbols but I still had the  
> exception issue.  I'll try to see if I can replicate with a simple test  
> app...

I believe I have found and fixed the problem. It has to do with a tricky
interaction between GCC attributes and specializations. Essentially,
GCC will ignore any attempt to set the visibility attribute for an
explicit template instantiation if a specialization of a member of 
this template has been seen. The funny part is that one can't provide
the specialization after the explicit instantiation either.

In any case, here is a binary with the fix:

http://www.codesynthesis.com/~boris/tmp/xsd-3.3.0.b3-i686-windows.zip

I have tested and I can see with nm that the symbols for the exception
classes are public. Would be great if you could give it a try ASAP and
let me know if it works for you.

Boris



More information about the xsd-users mailing list