PDA

View Full Version : Shell opens when start Qt app



giusepped
5th January 2009, 16:32
I have a very simple question.
I developed an application for Windows.
But when I run the application a commands shell opens...
It will be quite nice if no shell will open at all.
I compiled with make release.
Why?

fanat9
5th January 2009, 16:58
Check for console option in your .pro file.

giusepped
6th January 2009, 04:35
There is no console option altogether....
:confused:

spirit
6th January 2009, 07:51
try to do this in pro-file


...
CONFIG -= console
...

do you use VS? if yes then go to "Project->Project Properties->Configuration Properties->Linker->System" and change "Sub System" from "Console" to "Windows".

giusepped
13th January 2009, 17:00
I use mingw + qcreator.
I tried CONFIG -= console but nothing....

jpn
13th January 2009, 17:35
Make sure to rebuild the application.

giusepped
14th January 2009, 07:51
I did it two times with make distclean and qmake. But no luck.
Maybe thereis something in my code? I use qDebug() sometimes....
G

jpn
14th January 2009, 08:18
Are you using Visual Studio? If so, did you re-generate the VS project?

giusepped
14th January 2009, 08:19
No , I use shell of windows.
G

jpn
14th January 2009, 09:02
Could you attach the project?

giusepped
14th January 2009, 09:25
SOURCES += main.cpp \
myplot.cpp \
spa.cpp \
mymath.cpp \
mainwindow.cpp \
optimumplot.cpp \
radiazionereale.cpp \
settings.cpp \
gridset.cpp \
albedo.cpp \
linearinter.cpp \
modelsettings.cpp
TEMPLATE = app
CONFIG += warn_on \
thread \
qt \
debug_and_release \
qtestlib
CONFIG -= console
TARGET = /solar
HEADERS += myplot.h \
spa.h \
mymath.h \
mainwindow.h \
optimumplot.h \
radiazioneReale.h \
settings.h \
gridset.h \
albedo.h \
linearinter.h \
modelsettings.h
INCLUDEPATH += $(QWT)/src
DEPENDPATH += $(QWT)/src
LIBS += -L$(QWT)/lib \
-lqwt5
QMAKE_CXXFLAGS_DEBUG += -g \
-fno-inline \
-O0
QMAKE_CXXFLAGS_RELEASE += -g \
-02 \
-fno-inline
QT += sql \
svg
DISTFILES += del
RESOURCES += resource.qrc
FORMS += settings.ui \
gridset.ui \
albedo.ui \
modelsettings.ui
DEFINES += QWT_DLL \
QT_DLL
RC_FILE = solar.rc

giusepped
26th January 2009, 14:46
Nobody can help me in order to run windows app without the shell?
It is quite unpleasant having the shell....

Regards

pospiech
26th January 2009, 17:16
Are you using debug mode? I always have a shell in debug mode (for debugging output), but not in release mode.

giusepped
29th January 2009, 04:29
What should I do?
I shall remove debug_and_release from the .pro file? And put only release?
I don't know if it does work....I am compiling right now from scratch.
Ths

giusepped
2nd February 2009, 04:54
Please, somebody can help me with this problem?
G

jpn
2nd February 2009, 07:20
The console gets enabled because you have "CONFIG += qtestlib".