Results 1 to 7 of 7

Thread: Why not on release but debug

  1. #1
    Join Date
    Aug 2007
    Posts
    264
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Why not on release but debug

    Hi guys,

    I was trying to use the qwt library for my plotting. I compiled the source and examples but when i tried to make a release version of the examples the output won't run. When I tried creating the debug version of the examples it ran(output).

    I am using mingw and qt to compile it on my windows machine. I did not change anything on the pro files.

    Please help

    Bryan Rubia

  2. #2
    Join Date
    Aug 2007
    Posts
    264
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why not on release but debug

    By the way i am using Qt commercial DE 4.3.1

    baray98

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

    Default Re: Why not on release but debug

    Hard to say without knowing any details. It could be that your application contains some bug that only reveals itself while running in release mode.

  4. #4
    Join Date
    Aug 2007
    Posts
    264
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why not on release but debug

    I was running (compiliing) the examples that comes with it. here is the pro files of one of the examples

    bodeplot.pro
    Qt Code:
    1. # -*- mode: sh -*- ################################################
    2. # Qwt Widget Library
    3. # Copyright (C) 1997 Josef Wilgen
    4. # Copyright (C) 2002 Uwe Rathmann
    5. #
    6. # This library is free software; you can redistribute it and/or
    7. # modify it under the terms of the Qwt License, Version 1.0
    8. ###################################################################
    9.  
    10. include( ../examples.pri )
    11.  
    12. TARGET = bode
    13. QT += svg
    14.  
    15. HEADERS = \
    16. bode.h \
    17. bode_plot.h \
    18. cplx.h \
    19. pixmaps.h
    20.  
    21. SOURCES = \
    22. bode.cpp \
    23. bode_plot.cpp
    To copy to clipboard, switch view to plain text mode 

    here is the "examples.pri" this is included in the bodeplot.pro
    Qt Code:
    1. # -*- mode: sh -*- ################################################
    2. # Qwt Widget Library
    3. # Copyright (C) 1997 Josef Wilgen
    4. # Copyright (C) 2002 Uwe Rathmann
    5. #
    6. # This library is free software; you can redistribute it and/or
    7. # modify it under the terms of the Qwt License, Version 1.0
    8. ###################################################################
    9.  
    10. include( ../../qwtconfig.pri )
    11.  
    12. TEMPLATE = app
    13.  
    14. MOC_DIR = moc
    15. OBJECTS_DIR = obj
    16. INCLUDEPATH += ../../src
    17. DEPENDPATH += ../../src
    18.  
    19. unix:LIBS += -L../../lib -lqwt
    20.  
    21. win32:QwtDll {
    22. DEFINES += QT_DLL QWT_DLL
    23. }
    24.  
    25. contains(CONFIG, QwtDll) {
    26. win32-msvc:LIBS += ../../lib/qwt5.lib
    27. win32-msvc.net:LIBS += ../../lib/qwt5.lib
    28. win32-msvc2005:LIBS += ../../lib/qwt5.lib
    29. win32-g++:LIBS += -L../../lib -lqwt
    30. } else {
    31. win32-msvc:LIBS += ../../lib/qwt.lib
    32. win32-msvc.net:LIBS += ../../lib/qwt.lib
    33. win32-msvc2005:LIBS += ../../lib/qwt.lib
    34. win32-g++:LIBS += -L../../lib -lqwt
    35. }
    To copy to clipboard, switch view to plain text mode 

    and here is the qwtconfig.pri
    Qt Code:
    1. ######################################################################
    2. # Install paths
    3. ######################################################################
    4.  
    5. unix {
    6. INSTALLBASE = /usr/local/qwt-5.1.0-svn
    7. }
    8.  
    9. win32 {
    10. INSTALLBASE = C:/Qwt-5.1.0-svn
    11. }
    12.  
    13. target.path = $$INSTALLBASE/lib
    14. headers.path = $$INSTALLBASE/include
    15. doc.path = $$INSTALLBASE/doc
    16.  
    17. ######################################################################
    18. # qmake internal options
    19. ######################################################################
    20.  
    21. CONFIG += qt # Also for Qtopia Core!
    22. CONFIG += warn_on
    23. CONFIG += thread
    24.  
    25. ######################################################################
    26. # release/debug mode
    27. # The designer plugin is always built in release mode.
    28. # If want to change this, you have to edit designer/designer.pro.
    29. ######################################################################
    30.  
    31. CONFIG += debug # release/debug
    32.  
    33. debug {
    34. #linux-g++:QMAKE_CXXFLAGS += -fstack-protector
    35. #linux-g++:QMAKE_CXXFLAGS += -fstack-protector-all
    36. #linux-g++:QMAKE_CXXFLAGS += -Wstack-protector
    37. }
    38.  
    39. #linux-g++:QMAKE_CXXFLAGS += -fno-exceptions
    40.  
    41. ######################################################################
    42. # Build the static/shared libraries.
    43. # If QwtDll is enabled, a shared library is built, otherwise
    44. # it will be a static library.
    45. ######################################################################
    46.  
    47. CONFIG += QwtDll
    48.  
    49. ######################################################################
    50. # QwtPlot enables all classes, that are needed to use the QwtPlot
    51. # widget.
    52. ######################################################################
    53.  
    54. CONFIG += QwtPlot
    55.  
    56. ######################################################################
    57. # QwtWidgets enables all classes, that are needed to use the all other
    58. # widgets (sliders, dials, ...), beside QwtPlot.
    59. ######################################################################
    60.  
    61. CONFIG += QwtWidgets
    62.  
    63. ######################################################################
    64. # If you want to display svg imageson the plot canvas, enable the
    65. # line below. Note that Qwt needs the svg+xml, when enabling
    66. # QwtSVGItem.
    67. ######################################################################
    68.  
    69. CONFIG += QwtSVGItem
    70.  
    71. ######################################################################
    72. # If you have a commercial license you can use the MathML renderer
    73. # of the Qt solutions package to enable MathML support in Qwt.
    74. # So if you want this, copy qtmmlwidget.h + qtmmlwidget.cpp to
    75. # textengines/mathml and enable the line below.
    76. ######################################################################
    77.  
    78. #CONFIG += QwtMathML
    79.  
    80. ######################################################################
    81. # If you want to build the Qwt designer plugin,
    82. # enable the line below.
    83. # Otherwise you have to build it from the designer directory.
    84. ######################################################################
    85.  
    86. CONFIG += QwtDesigner
    87.  
    88. ######################################################################
    89. # If you want to auto build the examples, enable the line below
    90. # Otherwise you have to build them from the examples directory.
    91. ######################################################################
    92.  
    93. CONFIG += QwtExamples
    To copy to clipboard, switch view to plain text mode 

    please help

    baray98

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

    Default Re: Why not on release but debug

    And they compile correctly but crash when ran?

  6. #6
    Join Date
    Aug 2007
    Posts
    264
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why not on release but debug

    i figured it out!!! I have to recompile my library (qwt.dll) to be in release version if i have to run my app in release version and use a compiled debug version of qwt.dll if i will would like to run my app in debug version

    I guess qwt doesn't have a "-debug-and-release" version like qt

    baray98

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

    Default Re: Why not on release but debug

    From what you say it sounds like the application didn't compile and not didn't run. Those are completely two different things.

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. Replies: 2
    Last Post: 20th July 2007, 17:34
  3. Debug and Release
    By paranoid_android in forum Qt Programming
    Replies: 5
    Last Post: 18th November 2006, 14:58
  4. Replies: 6
    Last Post: 10th November 2006, 11: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.