[vtkusers] How to hide the console for a VTK/Qt app
John Drescher
drescherjm at gmail.com
Mon Apr 6 17:15:06 EDT 2009
On Mon, Apr 6, 2009 at 5:06 PM, John Drescher <drescherjm at gmail.com> wrote:
> On Mon, Apr 6, 2009 at 4:59 PM, Jim <jiksed at yahoo.com> wrote:
>>
>> Dear vtkusers,
>>
>> While executing VTK examples such as qtevents, a black (debugging) console
>> like Windows Command Prompt pops up. This doesn't look nice if my customers
>> see it. How can I hide this console?
>>
>> #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows")
>>
> Bing a windows developer for 15 years I know this should be the
> working one. Check your linker settings in your Visual Studio project
> file and make sure that it does say /subsystem:windows
>
> The default in cmake I believe is /subsystem:console which I know
> starts a new console. I remember that I used that option years ago to
> add debug console to all my GUI apps. :)
>
>From the cmake mailing list, I found this:
if(WIN32)
set_target_properties(WindowApplicationExample PROPERTIES
LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(WindowApplicationExample PROPERTIES
RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(WindowApplicationExample PROPERTIES
LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
set_target_properties(WindowApplicationExample PROPERTIES
MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif(WIN32)
--
John M. Drescher
More information about the vtkusers
mailing list