Reputation: 143
While developing a plug-in for Catia using the CAA C++-Interface, I need to do a dynamic_cast:
DerivedClass *derived = dynamic_cast<*derived>(base);
When Build with mkmk
, the compiler gives the warning:
[MkMk] warning C4541: 'dynamic_cast' used on polymorphic type '<DerivedClass>' with /GR-; unpredictable behavior may result
I tried to enable the run-time type information by adding LOCAL_CCFLAGS = /GR
to the Imakefile.mk
of the module. But the compiler overwrites this flag and disables the RTTI:
[MkMk] Command line warning D9025 : overriding '/GR' with '/GR-'
[MkMk] warning C4541: 'dynamic_cast' used on polymorphic type '<DerivedClass>' with /GR-; unpredictable behavior may result
How do I enable the RTTI correctly?
Upvotes: 1
Views: 282