<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi John,</DIV>
<DIV> </DIV>
<DIV>I modified CMakeList.txt file in qtevents folder with the following entry:</DIV>
<DIV> SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows"), ran CMake and generated a new VS2008 Solution file. However, my project properties did not reflect this change. My linker properties still show /subsystem:console. </DIV>
<DIV> </DIV>
<DIV>The good news is that the console didnot pop up after manually setting:</DIV>
<DIV>SubSystem= Windows (/SUBSYSTEM:WINDOWS)</DIV>
<DIV>in VS 2008.</DIV>
<DIV> </DIV>
<DIV>Thank you.</DIV>
<DIV><BR><BR><BR>--- On <B>Mon, 4/6/09, John Drescher <I><drescherjm@gmail.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: John Drescher <drescherjm@gmail.com><BR>Subject: Re: [vtkusers] How to hide the console for a VTK/Qt app<BR>To: "Jim" <jiksed@yahoo.com>, "VTK" <vtkusers@vtk.org>, "Cmake Mailing List" <cmake@cmake.org><BR>Date: Monday, April 6, 2009, 3:15 PM<BR><BR>
<DIV class=plainMail>On Mon, Apr 6, 2009 at 5:06 PM, John Drescher <<A href="http://us.mc320.mail.yahoo.com/mc/compose?to=drescherjm@gmail.com" ymailto="mailto:drescherjm@gmail.com">drescherjm@gmail.com</A>> wrote:<BR>> On Mon, Apr 6, 2009 at 4:59 PM, Jim <<A href="http://us.mc320.mail.yahoo.com/mc/compose?to=jiksed@yahoo.com" ymailto="mailto:jiksed@yahoo.com">jiksed@yahoo.com</A>> wrote:<BR>>><BR>>> Dear vtkusers,<BR>>><BR>>> While executing VTK examples such as qtevents, a black (debugging) console<BR>>> like Windows Command Prompt pops up. This doesn't look nice if my customers<BR>>> see it. How can I hide this console?<BR>>><BR>>> #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows")<BR>>><BR>> Bing a windows developer for 15 years I know this should be the<BR>> working one. Check your linker settings in your Visual Studio project<BR>> file and make
sure that it does say /subsystem:windows<BR>><BR>> The default in cmake I believe is /subsystem:console which I know<BR>> starts a new console. I remember that I used that option years ago to<BR>> add debug console to all my GUI apps. :)<BR>><BR>From the cmake mailing list, I found this:<BR><BR>if(WIN32)<BR> set_target_properties(WindowApplicationExample PROPERTIES<BR>LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")<BR> set_target_properties(WindowApplicationExample PROPERTIES<BR>RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")<BR> set_target_properties(WindowApplicationExample PROPERTIES<BR>LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")<BR> set_target_properties(WindowApplicationExample PROPERTIES<BR>MINSIZEREL "/SUBSYSTEM:WINDOWS")<BR>endif(WIN32)<BR><BR><BR>-- <BR>John M. Drescher<BR></DIV></BLOCKQUOTE></td></tr></table><br>