[Qt-creator] Cannot override default CXXFLAGS

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Sat Feb 7 11:38:12 CET 2009


On Fri, Feb 06, 2009 at 10:34:21PM -0700, Charles N Burns wrote:
> I cannot figure out how to override Qt Creator's CXXFLAGS setting. I
> tried adding this to the .PRO:
> 
>     QMAKE_CXXFLAGS += -fno-rtti -fno-exceptions
> 
> This does not work because the defaults include "-frtti -fexceptions"
> and these appear after QMAKE_CXXFLAGS on the command line, so they
> override the flags even when I specify them. The actual flags used
> according to the compiler output are:
>     g++ -c -fno-rtti -fno-exceptions -O2 -frtti -fexceptions -mthreads
> -Wall [...]

Try

    QMAKE_CXXFLAGS -= -frtti -fexceptions
    QMAKE_CXXFLAGS += -fno-rtti -fno-exceptions

Andre'



More information about the Qt-creator-old mailing list