Results 1 to 4 of 4

Thread: How to compile with o2 and ob1

  1. #1
    Join Date
    Feb 2015
    Posts
    21
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to compile with o2 and ob1

    How to set compiler flags. I want to compile my application with
    /ob1 and /o2 switches in qt creator. Where should I specify these flags?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to compile with o2 and ob1

    In the PRO file QMAKE_CFLAGS and/or QMAKE_CXXFLAGS and their related variables.

    However, you will find that /O2 is the default for a MSVC release build anyway. Setting /Ob1 defeats some of the tools used by /O2.

  3. #3
    Join Date
    Feb 2015
    Posts
    21
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to compile with o2 and ob1

    I am using mingw.
    I wrote it like this but not working.
    QMAKE_CSSFLAGS += -O2 \
    -Ob1

    and this is also not working
    QMAKE_CSSFLAGS += /O2 \
    /Ob1

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to compile with o2 and ob1

    CXXFLAGS and not CSSFLAGS.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. can not compile
    By haithun in forum Qt Programming
    Replies: 7
    Last Post: 13th July 2010, 10:04
  2. [Mac] Compile Qt
    By Tibo6 in forum Installation and Deployment
    Replies: 12
    Last Post: 3rd December 2009, 20:52
  3. how to compile qt use /clr?
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2009, 18:56
  4. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  5. how to compile Qt4.3.2???
    By coder1985 in forum Installation and Deployment
    Replies: 9
    Last Post: 11th December 2007, 19:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.