Results 1 to 8 of 8

Thread: qmake debug/release scope and disabling debugging output

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: qmake debug/release scope and disabling debugging output

    Quote Originally Posted by No-Nonsense View Post
    But even with "CONFIG += qt release uitools warn_on" the define and include from the debug scope are added to the Makefile.xxx.release. I had to add a "CONFIG -= debug" to the release project file as a workaround.
    Try "!release" insted of "debug".

    Another problem: I wanted to disable debuging output by adding the define QT_NO_DEBUG_OUTPUT to the release scope. But then my app won't compile anymore as I used qDebug() << ...; often instead of qDebug("...", ...);. If I had known this in advance... I had thought that all qDebug("...", ...) and qDebug << ... calls would not be compiled in when not compiling the project in debug mode... and disabling does not work as expected...[/quote]
    Does the following application compile and work with the define set?
    Qt Code:
    1. #include <QtDebug>
    2.  
    3. int main(){
    4. qDebug() << "xyz";
    5. return 0;
    6. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to wysota for this useful post:

    No-Nonsense (12th March 2007)

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
  •  
Qt is a trademark of The Qt Company.