PDA

View Full Version : Trying to use QtCreator with non-QT window, without a console.



ComServant
24th December 2010, 04:57
My project consists of two programs - one QT, one non-QT. I want to code them both using QtCreator.

My problem: I need to make a program using QtCreator without any QT dependencies, and without a console window.

My .pro file:

#-------------------------------------------------
#
# Project created by QtCreator 2010-12-22T21:58:04
#
#-------------------------------------------------

#QT += core

#QT -= gui \
# core

#Executable name:
TARGET = Game
#Folder to stick the executable in:
DESTDIR = "../../Bin"

CONFIG -= app_bundle

TEMPLATE = app

#A custom define I'm using.
DEFINES = COMMON_USING_SFML

INCLUDEPATH = .......

LIBS = .......

SOURCES = \
........

HEADERS = \
........


Also, in the "Project" sidebar button, under "Build Settings", I added to MingW '-mwindows' command.

Here's my settings:
http://img194.imageshack.us/img194/2756/buildsettings.png

I really apreciate your help.

Thought: Is the console window showing up, merely because I haven't yet coded an actual window yet?

Thought 2: Did I put the '-mwindows' flag in the right spot?

ChrisW67
24th December 2010, 05:14
I don't see why the "-m windows" option is required at all, especially since it is ignored by MingW's GNU make.

Regarding the Qt dependency:


CONFIG -= qt

suppresses Qt libraries, and:


CONFIG -= console

to suppress the console on Windows (although it may be suppressed just by excluding Qt libraries). The app_bundle option only means something on Mas OS X.

ComServant
24th December 2010, 05:30
Thanks, that works. Oddly, I was pretty sure I tried that previously, but I guess it required a rebuild.

Thank you!