Hi Robert,
this is not a compiler bug, this is by design. gcc compares instances of
classes by the pointer to its vtable. (Visual Studio uses a
string-comparision) If you define a class in a shared library and use it
in your app there are chances that you end up with two vtables of a
class, one in the app, one in the lib. If you don't setup proper symbol
visibility of your methods the linker does not have a chance to "see"
the two identical classes and merge them.
And this affects gcc >= 4.0 (don't know about clang)
More info here: http://gcc.gnu.org/wiki/Visibility especially Problems
with C++ exceptions (please read!)
Xcode defaults to hide symbols when creating a new project, that's all.
cheers,
Stephan
Am 07.02.13 11:48, schrieb Robert Osfield:
Hi Stephan,
On 7 February 2013 10:43, Stephan Huber <[email protected]> wrote:
this worked for me in the past: check your project settings, "Symbols
hidden By default" should be deactivated for both osg and your project.
Is this a workaround for a bug in the compiler or is it some obscure
way of enabling proper RTTI support?
Should we be adding this as an option by default for the LLVM compiler?
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org