Results 1 to 20 of 39

Thread: Unable to execute in Debug Mode

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Unable to execute in Debug Mode

    Hi...

    So far i was executing my applications in the release mode... i.e by adding CONFIG += release.. So far it was okay but now i am not able to debug the application w/o the application running in debug mode...
    Now when i try to execute the application in the debug mode i.e adding CONFIG += debug, i am not able to do so as it gives errors:
    [HTML]
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lQtGuid4.
    collect2: ld returned 1 exit status
    [/HTML]

    Please tell how to get the solution...

    Thanking you...
    Kapil

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

    Default Re: Unable to execute in Debug Mode


  3. #3
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unable to execute in Debug Mode

    Quote Originally Posted by wysota
    Hi..

    I had gone through the FAQ earlier and i tried it now also.. both the options give the same error... It just runs fine when i use CONFIG += release..

    rest all options it gives the error defined above...

    Kapil

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

    Default Re: Unable to execute in Debug Mode

    But did you actually compile and install after running configure?

  5. #5
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unable to execute in Debug Mode

    Quote Originally Posted by wysota
    But did you actually compile and install after running configure?
    Was this question in regard to installation of QT on my system or the application that i created..

    If installation then..

    after i installed, i ran configure -debug and then make at the QT 4.1.1 Command Prompt...

    which also gave many errors at the end... they were quite many and ranged out of the command prompt buffer... i am showing the last page of the errors.. first page went out of the range..
    [HTML]
    styles\qwindowsxpstyle.cpp:3331: error: `CS_ACTIVE' undeclared (first use this f
    unction)
    styles\qwindowsxpstyle.cpp:3333: error: `WP_CAPTION' undeclared (first use this
    function)
    styles\qwindowsxpstyle.cpp: In member function `virtual QPixmap QWindowsXPStyle:
    :standardPixmap(QStyle::StandardPixmap, const QStyleOption*, const QWidget*) con
    st':
    styles\qwindowsxpstyle.cpp:3368: error: `WP_SMALLCLOSEBUTTON' undeclared (first
    use this function)
    styles\qwindowsxpstyle.cpp:3368: error: `CBS_NORMAL' undeclared (first use this
    function)
    styles\qwindowsxpstyle.cpp:3371: error: `TS_TRUE' undeclared (first use this fun
    ction)
    styles\qwindowsxpstyle.cpp:3371: error: `pGetThemePartSize' cannot be used as a
    function
    styles\qwindowsxpstyle.cpp:3364: warning: unused variable 'dwOpt'
    styles\qwindowsxpstyle.cpp: In member function `QIcon QWindowsXPStyle::standardI
    conImplementation(QStyle::StandardPixmap, const QStyleOption*, const QWidget*) c
    onst':
    styles\qwindowsxpstyle.cpp:3399: error: `WP_SMALLCLOSEBUTTON' undeclared (first
    use this function)
    styles\qwindowsxpstyle.cpp:3399: error: `CBS_NORMAL' undeclared (first use this
    function)
    styles\qwindowsxpstyle.cpp:3400: error: `WP_MAXBUTTON' undeclared (first use thi
    s function)
    styles\qwindowsxpstyle.cpp:3400: error: `MAXBS_NORMAL' undeclared (first use thi
    s function)
    styles\qwindowsxpstyle.cpp:3403: error: `TS_TRUE' undeclared (first use this fun
    ction)
    styles\qwindowsxpstyle.cpp:3403: error: `pGetThemePartSize' cannot be used as a
    function
    styles\qwindowsxpstyle.cpp:3411: error: `MAXBS_PUSHED' undeclared (first use thi
    s function)
    styles\qwindowsxpstyle.cpp:3415: error: `MAXBS_HOT' undeclared (first use this f
    unction)
    styles\qwindowsxpstyle.cpp:3419: error: `MAXBS_DISABLED' undeclared (first use t
    his function)
    styles\qwindowsxpstyle.cpp:3396: warning: unused variable 'dwOpt'
    styles\qwindowsxpstyle.cpp:3439: error: `pGetThemePartSize' cannot be used as a
    function
    styles\qwindowsxpstyle.cpp:3443: error: `WP_CLOSEBUTTON' undeclared (first use t
    his function)
    styles\qwindowsxpstyle.cpp:3448: error: `CBS_PUSHED' undeclared (first use this
    function)
    styles\qwindowsxpstyle.cpp:3452: error: `CBS_HOT' undeclared (first use this fun
    ction)
    styles\qwindowsxpstyle.cpp:3456: error: `CBS_DISABLED' undeclared (first use thi
    s function)
    styles\qwindowsxpstyle.cpp:3433: warning: unused variable 'dwOpt'
    styles\qwindowsxpstyle.cpp:3473: error: `WP_RESTOREBUTTON' undeclared (first use
    this function)
    styles\qwindowsxpstyle.cpp:3476: error: `pGetThemePartSize' cannot be used as a
    function
    styles\qwindowsxpstyle.cpp:3469: warning: unused variable 'dwOpt'
    mingw32-make[2]: *** [tmp\obj\debug_shared\qwindowsxpstyle.o] Error 1
    mingw32-make[2]: Leaving directory `C:/Qt/4.1.0/src/gui'
    mingw32-make[1]: *** [debug] Error 2
    mingw32-make[1]: Leaving directory `C:/Qt/4.1.0/src/gui'
    mingw32-make: *** [debug-gui] Error 2
    [/HTML]

    else if the question was in regard to my application..

    then in the .pro file i included the statement CONFIG += debug and then tried to run the command make but giving nothing than error...

    The error which it gave i have mentioned earlier...

    Thank you..
    Kapil

  6. #6
    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: Unable to execute in Debug Mode

    You'll need the latest win32-api files from mingw:
    http://sourceforge.net/project/showf...ease_id=158847

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

    Default Re: Unable to execute in Debug Mode

    So you didn't compile it Last page of errors is of no use. You can redirect the output from make to a file to keep all the messages.

  8. #8
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unable to execute in Debug Mode

    Hi...

    The redirection of the make to a file kept everything but the errors and warnings

    Compiling it??

    After configure + make, i need to compile it also.. now for that which command do i have to run.....

    Will try that out

    Thanks for the reply...

    Kapil

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

    Default Re: Unable to execute in Debug Mode

    Make failed, so you didn't compile it. You have to redirect stderr to a file, not stdout, then you'll get your error messages. Alternatively press Ctrl+C when errors start to appear.

  10. #10
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Unable to execute in Debug Mode

    Quote Originally Posted by wysota
    Make failed, so you didn't compile it. You have to redirect stderr to a file, not stdout, then you'll get your error messages. Alternatively press Ctrl+C when errors start to appear.
    Here are the set of errors which have come..
    They arise from the file qwindowsxpstyle.cpp.. My OS is Widows 2000 prof... Are they 'coz of different OS...

    I am pasting the first page of them..

    [HTML]
    styles\qwindowsxpstyle.cpp:67:21: uxtheme.h: No such file or directory
    styles\qwindowsxpstyle.cpp:68:22: tmschema.h: No such file or directory
    styles\qwindowsxpstyle.cpp:168: warning: `__stdcall__' attribute only applies to function types
    styles\qwindowsxpstyle.cpp:168: error: typedef `PtrGetThemePartSize' is initialized (use __typeof__ instead)
    styles\qwindowsxpstyle.cpp:168: error: `HTHEME' was not declared in this scope
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before "hdc"
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before "int"
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before "int"
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before '*' token
    styles\qwindowsxpstyle.cpp:168: error: `prc' was not declared in this scope
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before "enum"
    styles\qwindowsxpstyle.cpp:168: error: expected primary-expression before '*' token
    styles\qwindowsxpstyle.cpp:168: error: `psz' was not declared in this scope
    styles\qwindowsxpstyle.cpp:169: error: ISO C++ forbids declaration of `HTHEME' with no type
    styles\qwindowsxpstyle.cpp:169: error: typedef `HTHEME' is initialized (use __typeof__ instead)
    styles\qwindowsxpstyle.cpp:169: error: expected primary-expression before "__attribute__"
    styles\qwindowsxpstyle.cpp:169: error: expected `,' or `;' before '(' token
    styles\qwindowsxpstyle.cpp:181: error: `INTLIST' has not been declared
    styles\qwindowsxpstyle.cpp:181: error: ISO C++ forbids declaration of `pIntList' with no type
    styles\qwindowsxpstyle.cpp:182: error: `MARGINS' has not been declared
    styles\qwindowsxpstyle.cpp:182: error: ISO C++ forbids declaration of `pMargins' with no type
    styles\qwindowsxpstyle.cpp:184: error: use of enum `THEMESIZE' without previous declaration
    styles\qwindowsxpstyle.cpp:184: error: ISO C++ forbids declaration of `eSize' with no type
    styles\qwindowsxpstyle.cpp:184: error: conflicting declaration 'typedef LONG (*PtrGetThemePartSize)(HTHEME, struct HDC__*, int, int, struct RECT*, int, struct SIZE*)'
    styles\qwindowsxpstyle.cpp:168: error: 'PtrGetThemePartSize' has a previous declaration as `typedef LONG*PtrGetThemePartSize'
    styles\qwindowsxpstyle.cpp:184: error: declaration of `typedef LONG (*PtrGetThemePartSize)(HTHEME, struct HDC__*, int, int, struct RECT*, int, struct SIZE*)'
    styles\qwindowsxpstyle.cpp:168: error: conflicts with previous declaration `typedef LONG*PtrGetThemePartSize'
    styles\qwindowsxpstyle.cpp:184: error: declaration of `typedef LONG (*PtrGetThemePartSize)(HTHEME, struct HDC__*, int, int, struct RECT*, int, struct SIZE*)'
    styles\qwindowsxpstyle.cpp:168: error: conflicts with previous declaration `typedef LONG*PtrGetThemePartSize'
    styles\qwindowsxpstyle.cpp:186: error: use of enum `PROPERTYORIGIN' without previous declaration
    styles\qwindowsxpstyle.cpp:186: error: ISO C++ forbids declaration of `pOrigin' with no type
    styles\qwindowsxpstyle.cpp:193: error: `PtrOpenThemeData' does not name a type
    styles\qwindowsxpstyle.cpp: In member function `HTHEME XPThemeData::handle()':
    styles\qwindowsxpstyle.cpp:399: error: `pOpenThemeData' undeclared (first use this function)
    styles\qwindowsxpstyle.cpp:399: error: (Each undeclared identifier is reported only once for each function it appears in.)
    styles\qwindowsxpstyle.cpp: In member function `const QPixmap* QWindowsXPStylePrivate::tabBody(QWidget*)':
    styles\qwindowsxpstyle.cpp:545: error: `TABP_BODY' undeclared (first use this function)
    styles\qwindowsxpstyle.cpp:546: error: `TS_TRUE' undeclared (first use this function)
    styles\qwindowsxpstyle.cpp:546: error: `pGetThemePartSize' cannot be used as a function
    styles\qwindowsxpstyle.cpp: In static member function `static bool QWindowsXPStylePrivate::resolveSymbols()':
    styles\qwindowsxpstyle.cpp:575: error: `pOpenThemeData' undeclared (first use this function)
    styles\qwindowsxpstyle.cpp:575: error: `PtrOpenThemeData' undeclared (first use this function)
    [/HTML]

    ALso there were set of warnings at the starting... Here they are..
    [HTML]
    ..\..\corelib\io\qfsfileengine.cpp:130: warning: 'QByteArray openModeToFopenMode(QFlags<QIODevice::OpenModeFlag >, const QString&)' defined but not used
    ..\..\corelib\io\qfsfileengine.cpp:130: warning: 'QByteArray openModeToFopenMode(QFlags<QIODevice::OpenModeFlag >, const QString&)' defined but not used
    ..\..\corelib\io\qfsfileengine.cpp:130: warning: 'QByteArray openModeToFopenMode(QFlags<QIODevice::OpenModeFlag >, const QString&)' defined but not used
    io\qfsfileengine.cpp:130: warning: 'QByteArray openModeToFopenMode(QFlags<QIODevice::OpenModeFlag >, const QString&)' defined but not used
    kernel\qeventdispatcher_win.cpp: In destructor `virtual QEventDispatcherWin32Private::~QEventDispatcherWin 32Private()':
    kernel\qeventdispatcher_win.cpp:156: warning: cast from pointer to integer of different size
    kernel\qeventdispatcher_win.cpp: In function `HWND__* qt_create_internal_window(const QEventDispatcherWin32*)':
    kernel\qeventdispatcher_win.cpp:322: warning: cast from pointer to integer of different size
    kernel\qeventdispatcher_win.cpp:780:2: warning: no newline at end of file
    Creating library file: C:\Qt\4.1.1\lib\libQtCored4.a
    Creating library file: C:\Qt\4.1.1\lib\libQtXmld4.a
    kernel\qapplication_win.cpp: In member function `bool QETWidget::translateTabletEvent(const MSG&, PACKET*, int)':
    kernel\qapplication_win.cpp:3303: warning: passing `qreal' for converting 1 of `QPoint::QPoint(int, int)'
    kernel\qapplication_win.cpp:3303: warning: passing `qreal' for converting 2 of `QPoint::QPoint(int, int)'
    In file included from C:/Qt/4.1.1/include/QtGui/private/qprintengine_win_p.h:1,
    from painting\qprinter.cpp:34:
    C:/Qt/4.1.1/include/QtGui/private/../../../src/gui/painting/qprintengine_win_p.h: In constructor `QWin32PrintEnginePrivate::QWin32PrintEnginePrivat e()':
    C:/Qt/4.1.1/include/QtGui/private/../../../src/gui/painting/qprintengine_win_p.h:180: warning: `QWin32PrintEnginePrivate::hdc' will be initialized after
    C:/Qt/4.1.1/include/QtGui/private/../../../src/gui/painting/qprintengine_win_p.h:177: warning: `void*QWin32PrintEnginePrivate:Info'
    [/HTML]

    As u said that make failed 'coz i had not compiled... But if this is the case then why does make execute my application whenever i include the line CONFIG += release in my .pro file...

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unable to execute in Debug Mode

    Did you upgrade MinGW's win API libraries as Christian told you?

Similar Threads

  1. Difference between Debug and Release Mode
    By sunil.thaha in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2013, 13:31
  2. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  3. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  4. Debug mode Qt 4.3.2
    By oetzi in forum Newbie
    Replies: 3
    Last Post: 13th October 2007, 18:06
  5. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 17:21

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.