Hi all, Thanks for the pointers to the source of the problem. Indeed it is related to symbol visibility. For reference, I had to change Xcode's default settings as follows:
GCC_SYMBOLS_PRIVATE_EXTERN = NO (Setting name in Xcode is "Symbols Hidden by Default") GCC_INLINES_ARE_PRIVATE_EXTERN = NO (Setting name in Xcode is "Inline Methods Hidden") and finally things work as expected on OS X. In my case I needed both for the fix. For reference, this is with Clang/LLVM 4.2.1. A thread on the Clang/LLVM mailing list indicates that there is a warning flag which can be activated to alert to these kind of issues: -Wweak-vtables With the default Xcode settings (hiding symbols not explicitly exported) and this warning activated, I got a lot of warnings like: 'ResetAnimationNodesVisitor' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit This is in spite of it clearly having a virtual method -- it would be more helpful if the weak vtables check could have told me that the vtable was being discarded by the symbol hiding, rather than not being created at all. A missing (or weak) vtable would certainly prevent RTTI from working correctly. Many thanks for the help with a rather obscure problem. Regards, Phil. On 8/02/2013, at 8:40 AM, Robert Osfield <robert.osfi...@gmail.com> wrote: > Hi Stephan, > > Thanks for the explanation, you learn something new everyday :-) > > Incompatibility like this I'd personally put down as a bug in the > design/implementation rather than a "feature". I am curious why we > haven't seen this particular issue more often. If the visibility of > classes is hidden by default then we should be seeing these issues > between OSG libs and applications all the time - for instance the code > almost identical that that Philip is using is used in osgPresentation > with it doing dynamic_cast<> on objects provided by the core osg lib. > > The question next is really what to do about the issue. Just document > the bug and it's workaround - changing symbol visibility via compiler > options or do we change the OSG itself so it by default doesn't hide > visibility of symbols. > > Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org