Can i disable RTTI?
-
wrote on 10 Sept 2020, 19:09 last edited by
Hello guys? Do you know how to disable RTTI?
-
Hello guys? Do you know how to disable RTTI?
@ChrisPanda said in Can i disable RTTI?:
Do you know how to disable RTTI?
yes
darn can't leave it at a yes, why do you want to disable it? And I assume its essential for Qt's internal classes and methods in the first case.
-
Hi and welcome to devnet,
Do you mean add "-fno-rtti" to the compiler flags ?
-
wrote on 10 Sept 2020, 19:28 last edited by ChrisPanda 9 Oct 2020, 19:29
I am using MSVC and i want to disable it to remove my classes name in compile time. I am happy that there is so many helpful members here
-
Are you using Qt Creator or Visual Studio directly ?
-
wrote on 10 Sept 2020, 20:16 last edited by
@SGaist I am using qt creator sir and i am developing qml quick application. is there any problem if i do that?
-
That depends on how you want to use these classes. Out of curiosity. Why do you want to disable RTTI for that application ?
-
wrote on 11 Sept 2020, 04:51 last edited by
Just for educational purpose. I just want to remove my classes name
-
Based on this page of the VS documentation, you would need to add "/GR-" to the compiler flags. But its goal is not to hide anything. It just does not generate some additional information.
-
wrote on 12 Sept 2020, 20:20 last edited by ChrisPanda 9 Dec 2020, 20:20
-
wrote on 12 Sept 2020, 20:29 last edited by
-
You are removing the negation of the option.
-
wrote on 14 Sept 2020, 09:43 last edited by
Sorry sir but i dont understand, can you please explain it sir?
-
Sorry sir but i dont understand, can you please explain it sir?
wrote on 14 Sept 2020, 10:12 last edited by@ChrisPanda
You have addedQMAKE_CXXFLAGS -= /GR-
Note that you have used
-=
. That removes the option. But @SGaist wants you to add that option:QMAKE_CXXFLAGS += /GR-
Note the
+=
!
1/14