Results 1 to 4 of 4

Thread: qmake Project file has both "debug" and "release" conditions true

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qmake Project file has both "debug" and "release" conditions true

    Here's my project file:

    Qt Code:
    1. TARGET = trialApp
    2. TEMPLATE = app
    3.  
    4. win32 {
    5. debug {
    6. LIBS += -L../trialLibA/debug
    7. PRE_TARGETDEPS += ../trialLibA/debug/libtrialLibA.a
    8. }
    9. release {
    10. LIBS += -L../trialLibA/release
    11. PRE_TARGETDEPS += ../trialLibA/release/libtrialLibA.a
    12. }
    13. }
    14.  
    15. INCLUDEPATH += ../trialLibA
    16. LIBS += -ltrialLibA
    17.  
    18. SOURCES += main.cpp\
    19. MainWindow.cpp
    20. HEADERS += MainWindow.h
    21. FORMS += MainWindow.ui
    To copy to clipboard, switch view to plain text mode 


    The problem is that both "debug" and "release" are defined when the makefile is generated. (I had started with debug {} else {} but debug was always defined).

    In both Makefile.Debug and Makefile.Release, LIBS is defined to have both "-L../trialLibA/debug" and "-L../trialLibA/release".

    So, of course, when I build the app, it takes the debug library (even when building release) because it's listed first in the LIBS path.

    How is my understanding of the qmake process flawed here?
    Last edited by barryhf; 13th February 2010 at 00:34.

Similar Threads

  1. Replies: 0
    Last Post: 15th November 2009, 09:40
  2. Replies: 3
    Last Post: 29th August 2009, 22:24
  3. Replies: 3
    Last Post: 8th July 2008, 19:37
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.