Subclassing class from shared library compiled with -fno-rtti
问题 I am trying to subclass from a shared library which was compiled with -fno-rtti. Unfortunately other libraries in my code base require -frtti. As a result I am getting link errors because the superclass does not have a typeinfo struct. Error received in a normal compilation: out.o: in function typeinfo for MyClass:myclass.cpp(.data.rel.ro.<cpp magic>): error: undefined reference to 'typeinfo for NetlinkListener' The class I want to subclass is an android class in libsysutils (snipped a little