[Qt-creator] Cannot override default CXXFLAGS
Charles N Burns
charlesnburns at gmail.com
Sat Mar 14 21:31:56 CET 2009
I found a way to make Qt Creator compile without RTTI and without C++
exceptions:
1) Edit qconfig.pri
Remove or comment exceptions and rtti.
For example:
CONFIG+= debug shared stl # exceptions rtti
Clean all and recompile.
This is a workaround to the the problem of the .pro file ignoring the line:
"QMAKE_CXXFLAGS -= -frtti -fexceptions"
Best regards,
--Charles Burns
On Sat, Feb 7, 2009 at 11:00 AM, Charles N Burns <charlesnburns at gmail.com>wrote:
> Thank you for the reply. Unfortunately, adding "-= (flags)" seems to
> have no effect.
>
> I tried the following:
> * Build -> Clean All then Build -> Rebuild All
> * Closed/reopened Qt Creator and did previous step
> * Compiled both debug and release versions.
> * Threw an exception in main()
>
> Attached is a screenshot showing the .pro and the actual compile flags
> used.
>
> Best regards,
>
> --Charles Burns
>
> On Sat, Feb 7, 2009 at 3:38 AM, Andre Poenitz
> <andre.poenitz at mathematik.tu-chemnitz.de> wrote:
> > 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'
> > _______________________________________________
> > Qt-creator mailing list
> > Qt-creator at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-creator
> >
>
>
>
> --
> "Be who you are and say what you feel, because those who mind don't
> matter and those who matter don't mind." --Dr. Seuss
>
--
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind." --Dr. Seuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090314/52088458/attachment.html
More information about the Qt-creator-old
mailing list