For the entire C ++ project, RTTI is disabled, but it is needed selectively for several classes.
How can I partially enable RTTI? How to indicate this in the project compilation settings?
For the entire C ++ project, RTTI is disabled, but it is needed selectively for several classes.
How can I partially enable RTTI? How to indicate this in the project compilation settings?
1) Classes for which you need to enable and disable rtti need to post to different .h and .cpp files
2) For msvc15, open the Solution Explorer, find there the necessary .cpp files in the Source folder - PCM - properties (Select config and platform) - c / c ++ - all options, then find the line "Enable RTTI" and set "yes" (the same flag / GR)
By default, the studio uses the project configuration when compiling, but for certain files it is possible to branch the configuration.
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</RuntimeTypeInfo> to the <ClCompile Include="YourFile.cpp"> element <ClCompile Include="YourFile.cpp"> . Condition determines which builds to use. - goldstar_labsSource: https://ru.stackoverflow.com/questions/532690/
All Articles