Results 1 to 6 of 6

Thread: qt compiler

  1. #1
    Join Date
    Apr 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default qt compiler

    hello. how can i change compiler standard used in qt creator? i need g++ 4.5.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qt compiler

    Qt Creator (or Qt SDK) doesn't install any C++ compiler. Qt SDK uses the gcc version which is installed on your system.

    //only the Windows version of SDK comes with MinGW compiler.

  3. #3
    Join Date
    Apr 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt compiler

    We don't understand each other. There are two versions of g++ installed on my computer. They are g++ 4.4 and g++ 4.5. When I use NetBeans I have to type -std=c++0x to switch g++ 4.5. What should I do to switch g++ 4.5 in Qt Creator?

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt compiler

    <Zlatomir's advice is much much better>
    Last edited by squidge; 6th April 2011 at 21:04.

  5. #5
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qt compiler

    I didn't try this but i think this line in the .pro file should do the trick:
    Qt Code:
    1. QMAKE_CXXFLAGS += -std=c++0x
    To copy to clipboard, switch view to plain text mode 
    documentation

  6. #6
    Join Date
    Apr 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qt compiler

    It works, thanks.

Similar Threads

  1. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 09:33
  2. Strange compiler behaviour (compiler passes wrong argument)
    By SasaVilic in forum General Programming
    Replies: 2
    Last Post: 2nd November 2010, 12:36
  3. Compiler
    By CHeader in forum Qt Programming
    Replies: 3
    Last Post: 10th April 2008, 16:45
  4. MinGW Compiler under WXP
    By Walsi in forum Newbie
    Replies: 2
    Last Post: 30th March 2007, 18:26
  5. Qt or Compiler bug?
    By jrideout in forum Qt Programming
    Replies: 5
    Last Post: 2nd March 2006, 22:34

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.