View Full Version : Why not on release but debug
baray98
8th August 2007, 23:36
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
baray98
8th August 2007, 23:55
By the way i am using Qt commercial DE 4.3.1
baray98
wysota
9th August 2007, 00:33
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.
baray98
9th August 2007, 01:32
I was running (compiliing) the examples that comes with it. here is the pro files of one of the examples
bodeplot.pro
# -*- mode: sh -*- ################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
################################################## #################
include( ../examples.pri )
TARGET = bode
QT += svg
HEADERS = \
bode.h \
bode_plot.h \
cplx.h \
pixmaps.h
SOURCES = \
bode.cpp \
bode_plot.cpp
here is the "examples.pri" this is included in the bodeplot.pro
# -*- mode: sh -*- ################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
################################################## #################
include( ../../qwtconfig.pri )
TEMPLATE = app
MOC_DIR = moc
OBJECTS_DIR = obj
INCLUDEPATH += ../../src
DEPENDPATH += ../../src
unix:LIBS += -L../../lib -lqwt
win32:QwtDll {
DEFINES += QT_DLL QWT_DLL
}
contains(CONFIG, QwtDll) {
win32-msvc:LIBS += ../../lib/qwt5.lib
win32-msvc.net:LIBS += ../../lib/qwt5.lib
win32-msvc2005:LIBS += ../../lib/qwt5.lib
win32-g++:LIBS += -L../../lib -lqwt
} else {
win32-msvc:LIBS += ../../lib/qwt.lib
win32-msvc.net:LIBS += ../../lib/qwt.lib
win32-msvc2005:LIBS += ../../lib/qwt.lib
win32-g++:LIBS += -L../../lib -lqwt
}
and here is the qwtconfig.pri
################################################## ####################
# Install paths
################################################## ####################
unix {
INSTALLBASE = /usr/local/qwt-5.1.0-svn
}
win32 {
INSTALLBASE = C:/Qwt-5.1.0-svn
}
target.path = $$INSTALLBASE/lib
headers.path = $$INSTALLBASE/include
doc.path = $$INSTALLBASE/doc
################################################## ####################
# qmake internal options
################################################## ####################
CONFIG += qt # Also for Qtopia Core!
CONFIG += warn_on
CONFIG += thread
################################################## ####################
# release/debug mode
# The designer plugin is always built in release mode.
# If want to change this, you have to edit designer/designer.pro.
################################################## ####################
CONFIG += debug # release/debug
debug {
#linux-g++:QMAKE_CXXFLAGS += -fstack-protector
#linux-g++:QMAKE_CXXFLAGS += -fstack-protector-all
#linux-g++:QMAKE_CXXFLAGS += -Wstack-protector
}
#linux-g++:QMAKE_CXXFLAGS += -fno-exceptions
################################################## ####################
# Build the static/shared libraries.
# If QwtDll is enabled, a shared library is built, otherwise
# it will be a static library.
################################################## ####################
CONFIG += QwtDll
################################################## ####################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# widget.
################################################## ####################
CONFIG += QwtPlot
################################################## ####################
# QwtWidgets enables all classes, that are needed to use the all other
# widgets (sliders, dials, ...), beside QwtPlot.
################################################## ####################
CONFIG += QwtWidgets
################################################## ####################
# If you want to display svg imageson the plot canvas, enable the
# line below. Note that Qwt needs the svg+xml, when enabling
# QwtSVGItem.
################################################## ####################
CONFIG += QwtSVGItem
################################################## ####################
# If you have a commercial license you can use the MathML renderer
# of the Qt solutions package to enable MathML support in Qwt.
# So if you want this, copy qtmmlwidget.h + qtmmlwidget.cpp to
# textengines/mathml and enable the line below.
################################################## ####################
#CONFIG += QwtMathML
################################################## ####################
# If you want to build the Qwt designer plugin,
# enable the line below.
# Otherwise you have to build it from the designer directory.
################################################## ####################
CONFIG += QwtDesigner
################################################## ####################
# If you want to auto build the examples, enable the line below
# Otherwise you have to build them from the examples directory.
################################################## ####################
CONFIG += QwtExamples
please help
baray98
wysota
9th August 2007, 13:18
And they compile correctly but crash when ran?
baray98
9th August 2007, 23:47
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
wysota
10th August 2007, 09:08
From what you say it sounds like the application didn't compile and not didn't run. Those are completely two different things.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.