How to enable RTTI ONLY in specific modules in 4.20.3

I’m working in an ANDROID application and I’m trying to use some third-party libraries that require RTTI, but enabling bUseRTTI in a specific module has no effect. I need to enable bUseRTTI in main project module in order to the code to compile. BUT if I do this Linker cannot link with Engine internal modules anymore. UObject, in the core module for example. Shows this error “undefined reference to `typeinfo for UObject’”.

I know this is an older question, but the answer I just found still applies, I think. From: RTTI failed compiling when enabled for 4.23 linux - Platform & Builds - Epic Developer Community Forums

set RTTI to true just for the module (in its Build.cs) that actually needs dynamic_cast and see if you can get away with that (you may if you don’t subclass engine classes in that module). If your module has both dynamic_cast and also subclasses engine classes, you’ll need split that into two modules and only have RTTI enabled for the one that uses dynamic_casts.

(Emphasis added)

Hope that helps!

Hi dranzyAdix, I know this is old but, have you found any solution since without having to split your module as suggested below? Just in case, i’m on UE 4.25