[QBS] Console appears

Julien Kirsch t3ch13m4n at gmail.com
Wed Aug 5 01:10:23 CEST 2015


Hi,
in my recent project I need to get the rid of the console, since I have use
for it.
I took a look at your "examples" and found the following code fragment:

"consoleApplication: true"

It looked like a simple solution, but soon I found out, that has actually
no effect.
When it is set to "false", I still have a "console" appear on my screen.

These are my build files I use:
[Noir.qbs]

import qbs

Product{

name: "Noir"
type: "application"
consoleApplication: "false"
files: [
"src/Noir.cpp"]
Depends{ name: "cpp" }
Depends{ name: "Noir.Graphics" }
cpp.includePaths: "include"
Group{
qbs.install: true
fileTagsFilter: "application"
}
}

[Graphics.qbs]

import qbs

Product{

name: "Noir.Graphics"
type: "dynamiclibrary"
files: ["src/Window.cpp"]
Depends{ name: "cpp" }
cpp.includePaths: "include"
cpp.defines:{
// Apply diffrent macros for each platform
if(qbs.targetOS == "windows")
return ["OS_WINDOWS","LIB_EXPORTS"]
else if(qbs.targetOS == "linux")
error("Module 'Graphics' not implemented for linux yet!")
// return ["OS_LINUX"]
else if(qbs.targetOS == "osx")
error("Module 'Graphics' not implemented for osx yet!")
//return ["OS_X"]
}
cpp.staticLibraries:{
// Apply diffrent libraries for each platform
if(qbs.targetOS == "windows")
return ["user32.lib","opengl32.lib"]
else if(qbs.targetOS == "linux")
error("Module 'Graphics' not implemented for linux yet!")
// return ""
else if(qbs.targetOS == "osx")
error("Module 'Graphics' not implemented for osx yet!")
// return ""
}
Export{
Depends{ name: "cpp" }
cpp.includePaths: "include"
}

Group{
qbs.install: true
fileTagsFilter: "dynamiclibrary"
}
}


I tried to set the "consoleApplication" value to false in both modules;
simultanously and seperately.

What am I missing?

Sincerely,
J.A. Kirsch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150805/d98afa48/attachment.html>


More information about the Qbs mailing list