Assertion from wxDynamicLibrary call...
Carl Godkin
cgodkin at gmail.com
Wed Nov 7 15:23:52 PST 2007
On 11/7/07, Vadim Zeitlin <vadim at wxwidgets.org> wrote:
>
> On Wed, 7 Nov 2007 07:37:20 -0800 Carl Godkin <cgodkin at gmail.com> wrote:
>
> CG> I know why this is happening: the RTTI table is seeing some wx
> classes a
> CG> second time .
> CG>
> CG> I even know how to prevent it: If I don't link the plugin with
> CG> --no-undefined and leave off the wx libraries, then the plugin loads
> CG> fine and works correctly.
>
> It looks that wx is linked in twice if you use --no-undefined and this
> creates all sorts of problems (with everything global, including wxRTTI
> tables). So the goal is to avoid it but I really have no idea how nor why
> does it happen now. I do suppose that your main program uses wx as (the
> same) shared library as the plugins do, doesn't it?
Yes, the main program uses wxWidgets (and the same exact version as
the plugin).
However, for distribution reasons, we now build wxWidgets statically. Are
you
thinking that if we built wxWidgets as a shared library and used the same
shared library in the main app as in the plugin, then I wouldn't have the
problem?
If so, that makes sense. I think I'll just avoid --no-undefined for plugins
that
use wxWidgets instead since our lives got a lot simpler once we started
linking statically.
Thanks for replying,
carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20071107/996=
70e30/attachment.htm
More information about the wx-users
mailing list