Results 1 to 5 of 5

Thread: qmake release with debug info

  1. #1
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qmake release with debug info

    hello,

    I'm using QMake to generate a Visual Studio project file on Windows.
    I want my release build to include debugging information, which I can set manually in properties with:
    C++/General/Debug Information Format -> Program Database
    Linker/Debugging/Generate Debug Info -> Yes

    However each time I change my project configuration and run QMake these properties have to be manually reset.
    So, does there happen to be a QMake flag to generate a release binary with debugging information?

    I know this question is quite petty because manually setting those properties is not too much trouble. Still, I would like to make my development pipeline as clean as possible.

    thanks,
    Richard

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake release with debug info

    the debug information is something that the compiler would put, so i guess at most, you can try adding /DEBUG to the compiler flags in your make file.

  3. The following user says thank you to talk2amulya for this useful post:

    rbp (18th May 2009)

  4. #3
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake release with debug info

    which flag do you think would be relevant to add /DEBUG to? QMAKE_CXXFLAGS?

  5. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake release with debug info

    QMAKE_CXXFLAGS or QMAKE_CXXFLAGS_RELEASE..either change them in your makefile or you can change your qmake.conf

  6. #5
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Posts
    136
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake release with debug info

    hello talk2amulya,

    thanks for the hint! I have got it working now and the exact flags I needed were:
    QMAKE_CXXFLAGS_RELEASE += /Zi
    QMAKE_LFLAGS_RELEASE += /DEBUG

    Richard

Similar Threads

  1. Need debug and release versions of Qwt?
    By Tiansen in forum Qwt
    Replies: 1
    Last Post: 28th March 2008, 07:55
  2. Replies: 2
    Last Post: 20th July 2007, 16:34
  3. Replies: 6
    Last Post: 10th November 2006, 10:38
  4. qmake and debug output
    By mattie in forum Qt Programming
    Replies: 7
    Last Post: 18th September 2006, 22:33

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.