Results 1 to 5 of 5

Thread: qt debug

  1. #1

    Default qt debug

    Hi,

    I'm trying debug my qt application but it doesn't work, or I think so. My qt version is 4.1 and it's compiled with the flag -debug-and-release.
    I would like to see the debug information of qabstractsocket_debug that i can see in the source of qt, for example in $(QTDIR)/src/network/qabstractsocket.cpp. It's that possible??

    I've a .pro file like this:

    TEMPLATE = app
    TARGET = cliente
    DEPENDPATH += .
    INCLUDEPATH += .
    QT += network
    CONFIG += console debug

    # Input
    HEADERS += cliente.h \
    ../p2pbackup/src/sslsocket.h \
    ../p2pbackup/src/messages.h \
    ../p2pbackup/src/preferences.h \
    ../p2pbackup/src/peerclient.h
    SOURCES += cliente.cpp \
    main.cpp \
    ../p2pbackup/src/sslsocket.cpp \
    ../p2pbackup/src/messages.cpp \
    ../p2pbackup/src/preferences.cpp \
    ../p2pbackup/src/peerclient.cpp

    unix{
    LIBS += -lssl -lcrypto
    }

    And in the last step my compiler output is:
    g++ -Wl,-rpath,/usr/local/qt-4.1.1/lib -o cliente cliente.o main.o sslsocket.o messages.o preferences.o peerclient.o moc_cliente.o moc_sslsocket.o moc_peerclient.o -L/usr/local/qt-4.1.1//lib -lssl -lcrypto -lQtGui_debug -L/usr/local/src/qt/qt-x11-opensource-src-4.1.1/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtNetwork_debug -lQtCore_debug -lz -lm -ldl -lpthread

    Anyone could help me??
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt debug

    Are you getting other debug info on the console? Do qDebug() statements work? The project file and compiler input look fine, debug messages should work (provided that you start your app from the console).

  3. #3

    Default Re: qt debug

    Yes, qDebug() works fine and I run the application under console.

  4. #4
    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

    This has nothing to do with qDebug nor Qt...
    You have to uncomment '#define QABSTRACTSOCKET_DEBUG' in qabstractsocket.cpp and recompile Qt like in every other source where something is commented out by an ifdef.

  5. #5

    Default Re: qt debug

    Ohhh, you're right. Thank you Christian

Similar Threads

  1. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  2. Replies: 2
    Last Post: 8th November 2007, 20:15
  3. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 17:41
  4. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 11:38
  5. Replies: 11
    Last Post: 22nd March 2006, 19:06

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.