Results 1 to 3 of 3

Thread: QT debug confusion

  1. #1
    Join Date
    Sep 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QT debug confusion

    I recently compiled QT 4.4.2 on Linux. The configure --help command says that the debug mode is off by default. Indeed, configure said "Debug No". I looked to the lib directory and to my surprise it contained every file in 2 versions - a normal and .debug one. For example libQtCore.so.4.4.2 was 2.2 MB and libQtCore.so.4.4.2.debug was 17 MB.

    Then I tried recompiling QT with debug on. I installed it to a different location and checked sizes:
    libQtCore.so.4.4.2 - 3 MB
    libQtCore.so.4.4.2.debug - 24 MB

    So, it seems that compiling with debug gives some extra information to the libs, but now I'm completely confused. Can anyone explain what additional stuff is included in the debug version and why those .debug file were created in both cases.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT debug confusion

    debug only means that it's compiled with '-O0 -g' whereas release means '-O2 -g' when I'm correct.

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT debug confusion

    Well, it's seems to be true. I checked Makefiles. Release version has "-g -O2" whereas the debug one "-g" which really means "-g -O0" as "-O0" is default.
    Additionally release binaries are compiled with -DQT_NO_DEBUG.

    What about the difference between .so and .so.debug files? Why both of them are created by default?

    UPDATE:

    Anyway, a binary compiled with "CONFIG += debug" doesn't seem to use these .so.debug files. At least ldd claims so.
    Last edited by swistak; 25th September 2008 at 00:07.

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 07:27
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 17:48
  3. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 18:21
  4. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 18:41
  5. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 12:38

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.