[Interest] dynamic_cast failing

René J.V. Bertin rjvbertin at gmail.com
Sat Apr 11 22:09:41 CEST 2015


On Saturday April 11 2015 10:43:14 Thiago Macieira wrote:

> Make sure that all classes participating in this party check all these boxes:
>  * have an export macro in the class declaration

That was the culprit. The dynamically-casted-to class (Okular::ViewerInterface in this case) didn't have an export statement in its declaration, nor did one of the other (abstract) parent classes. I suppose I only needed to set the public (default) visibility on the target class but set it on both to be certain.

I guess this also explains why the cast worked on Linux, that is, if symbol visibility still is public by default (or using a special compiler flag).

Thanks!
René



More information about the Interest mailing list