dynamic_cast an interface from a shared library which was loaded by lt_dlopen(libtool) doesn't work

◇◆丶佛笑我妖孽 提交于 2019-12-02 02:38:44

you might try building with -Wl,--export-dynamic linker argument. I recall needing this argument when encountering similar behavior.

You're problem may be the private inheritance:

_rwd_autocomplete_plugin_base_t : _rwd_plugin_base_t

Also I think because you have virtual functions your types are already polymorphic, but wouldn't hurt to add virtual destructors.

Edit: Sorry just realized you're using struct there so the default inheritance is public. But probably best to be explicit, especially since you're seeing differences between compilers.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!