Cannot use typeid with -fno-rtti [SOLVED]
-
Hi folks,
I'm using mingw4.0.4 with QT4.8.3 and Creator 2.5.2.
I just want to compile the following simple line of code in a default hello world console program:@cout<<typeid(a).name()<<endl;@
The compiler brings the following error:
'cannot use typeid with -fno-rtti'
Any idea how to fix this? Where can i add/remove such compiler parameters? I only found the qmake arguments!
Big thanks in advance.
-
What exact parameter do I have to add to have rtti?
OK - I found it in the build directory: Makefile.XXX CXXFLAGSCXXFLAGS = -O2 -Wall -Wextra -fno-exceptions -fno-rtti $(DEFINES)
The Problem is, that when I rebuild or clean the projects, these makefiles will be recreated with -fno-rtti!!! Grrrrr
Isn't it somehow possible to set this up in the project itself? When I just check in the .pro files and the source files! So everybody who is working on the projects has to change it himself? There must be a more common way?!? -
[quote author="broadpeak" date="1351167587"]I used it under Windows but with MinGW. (QtSDK 1.2.1)[/quote]
Hmm... That is a very old version don't u think!?
Anyways, it's not working by default on any of my workstations using MinGW!
So my question still is: Is it somehow possible to set CXXFLAGS via .pro file or creator settings?
I don't want all developers to change their global configs just to compile this project!
hmm....Thanks in advice