Results 1 to 3 of 3

Thread: How to set .pro file about debug and release

  1. #1
    Join Date
    Mar 2009
    Posts
    14
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default How to set .pro file about debug and release

    This is my pro file
    Qt Code:
    1. win32{
    2. Release:
    3. MOC_DIR = $$PWD/../bin/release/win32/$$TARGET
    4. OBJECTS_DIR = $$PWD/../bin/release/win32/$$TARGET
    5. DESTDIR = $$PWD/../bin/release/win32/$$TARGET
    6. Debug:
    7. MOC_DIR = $$PWD/../bin/debug/win32/$$TARGET
    8. OBJECTS_DIR = $$PWD/../bin/debug/win32/$$TARGET
    9. DESTDIR = $$PWD/../bin/debug/win32/$$TARGET
    10. }
    11. macx{
    12. Release:
    13. MOC_DIR = $$PWD/../bin/release/macx/$$TARGET
    14. OBJECTS_DIR = $$PWD/../bin/release/macx/$$TARGET
    15. DESTDIR = $$PWD/../bin/release/macx/$$TARGET
    16. Debug:
    17. MOC_DIR = $$PWD/../bin/debug/macx/$$TARGET
    18. OBJECTS_DIR = $$PWD/../bin/debug/macx/$$TARGET
    19. DESTDIR = $$PWD/../bin/debug/macx/$$TARGET
    20. }
    To copy to clipboard, switch view to plain text mode 

    Question 1
    In windows
    when I "Set Build Configuration" to debug or release, it always run like this.
    Qt Code:
    1. Starting C:\test\bin\debug\win32\app\app.exe...
    2. C:\test\bin\debug\win32\app\app.exe exited with code 0
    To copy to clipboard, switch view to plain text mode 
    But I can find the app.exe at folder of bin\debug\win32\app\app.exe and bin\release\win32\app\app.exe.

    Question 2
    In mac
    when I "Set Build Configuration" to debug or release, it always crate app.app at
    bin\debug\macx\app\app.app
    Why can not found bin\release\macx\app\app.app ?
    Last edited by yycking; 5th May 2010 at 03:13.

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to set .pro file about debug and release

    The condition to check whether something is a "Debug" build is CONFIG(debug, debug|release)

  3. #3
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to set .pro file about debug and release

    You can do something like:

    CONFIG(debug, debug|release) {
    CONFIG -= debug release
    CONFIG += debug
    QMAKE_POST_LINK = " "
    }
    CONFIG(release, debug|release) {
    CONFIG -= debug release
    CONFIG += release
    QMAKE_POST_LINK = " "
    }
    Last edited by rajji_saini; 28th February 2011 at 18:32. Reason: Wrong post

Similar Threads

  1. Replies: 3
    Last Post: 28th March 2009, 15:37
  2. Replies: 0
    Last Post: 6th March 2009, 08:19
  3. Replies: 2
    Last Post: 2nd April 2008, 17:28
  4. Replies: 3
    Last Post: 25th May 2007, 07:49
  5. Replies: 13
    Last Post: 21st June 2006, 21:22

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.