Page 1 of 2 12 LastLast
Results 1 to 20 of 39

Thread: Unable to execute in Debug Mode

  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?

  12. #12
    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 jacek
    Did you upgrade MinGW's win API libraries as Christian told you?
    Yes, I did that.. i extracted the include and lib headers and replaced them with the existing MinGW files...

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

    Then try compiling Qt without windows xp style (configure -no-style-windowsxp).

  14. #14
    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 jacek
    Then try compiling Qt without windows xp style (configure -no-style-windowsxp).
    did that too.. still am not able to make in debug mode..

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

    Quote Originally Posted by Kapil
    did that too.. still am not able to make in debug mode..
    And you are still getting error messages regarding qwindowsxpstyle.cpp file? Does the Qt version you have support your OS?

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

    And try running "make sub-src" instead of pure "make", this should only compile the libraries you need (provided that you already have the release mode files). Of course it's all in addition to what's already been said (make clean could also help if you still get errors on the windowsxp style, which you won't be able to use on Windows2000 anyway).

  17. #17
    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 jacek
    And you are still getting error messages regarding qwindowsxpstyle.cpp file? Does the Qt version you have support your OS?

    The QT version supports my OS.. its Windows2000 pro.
    I am able to create applications and the execute them in the release mode.. but that does not create my build in debug mode...
    so if there are errors then i am not able to debug them..

    This is the error when i try to run "make" for my application in debug mode..
    [HTML]
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lQtGuid4
    [/HTML]

    Kapil

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

    Seems like Kapil won't understand us...
    Did you build Qt witout errors with configure.exe -no-style-windowsxp and is qt4-dir/lib/qtguid4.dll available? If the dll is not avialable, than you did not build Qt correct and therefore linking your app in debug mode will not work...

  19. #19
    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 ChristianEhrlicher
    Did you build Qt witout errors with configure.exe -no-style-windowsxp
    yes i did build it same as it was suggested i.e. i ran the command configure.exe -no-style-windowsxp..

    is qt4-dir/lib/qtguid4.dll available?
    yes, it is there in my qt4-dir/lib/qtguid4.dll...

    Now what next ?? I have done exactly the way it has been suggested in the above posts..

    I hope this makes u feel i have understood something somewhere
    Thanks for the reply...

    Kapil

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

    Ok, then please rerun qmake (the one in qt4-dir/bin) and if it won't link either, take a look if qt4-dir/lib is in the link-command (or post the complete link command and not only the error message). Maybe you use another qmake.exe which points to the wrong qt4/lib - directory...

Similar Threads

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