<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Las time I had to fight with that, I had to change the name of the
    "main" function for "WinMain".<br>
    <br>
    But it was a long time ago, and I was working with GTK...<br>
    <br>
    Take a look at that:
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/2139637/hide-console-of-windows-application">http://stackoverflow.com/questions/2139637/hide-console-of-windows-application</a><br>
    <br>
    Good luck<br>
    Cyrille<br>
    <br>
    Le 27/04/2011 14:46, G G a &eacute;crit&nbsp;:
    <blockquote
      cite="mid:BANLkTimdf1THg9yDk=qQUaRhmG-7wSx-7g@mail.gmail.com"
      type="cite">When I add WIN32, as you wrote<br>
      <br>
      ADD_EXECUTABLE( Application WIN32 ${SRCS} ${UI_SRCS} ${RCC_SRCS})<br>
      <br>
      then when I compile solution I get<br>
      <br>
      Error&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; error LNK2019: unresolved external symbol
      _WinMain@16 referenced in function ___tmainCRTStartup&nbsp;&nbsp;&nbsp;
      MSVCRT.lib&nbsp;&nbsp;&nbsp; Application<br>
      Error&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; fatal error LNK1120: 1 unresolved externals&nbsp;&nbsp;&nbsp;
      C:\DP-ITK-APPS\src\my_test\bin\Release\Application.exe&nbsp;&nbsp;&nbsp;
      Application<br>
      <br>
      I have set window subsystem acording this<br>
      <a moz-do-not-send="true"
href="http://bobobobo.wordpress.com/2008/01/29/error-lnk2019-error1error-lnk2019-unresolved-external-symbol-_main-referenced-in-function-___tmaincrtstartupmsvcrtdlib/">http://bobobobo.wordpress.com/2008/01/29/error-lnk2019-error1error-lnk2019-unresolved-external-symbol-_main-referenced-in-function-___tmaincrtstartupmsvcrtdlib/</a><br>
      <br>
      (I think, that new solution is hasnt to be created?)<br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">2011/4/27 G G <span dir="ltr">&lt;<a
            moz-do-not-send="true"
            href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          Thank you, I tried it ;)
          <div>
            <div class="h5"><br>
              <br>
              <div class="gmail_quote">2011/4/27 Michael Jackson <span
                  dir="ltr">&lt;<a moz-do-not-send="true"
                    href="mailto:mike.jackson@bluequartz.net"
                    target="_blank">mike.jackson@bluequartz.net</a>&gt;</span><br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  In your add_executable call in your cmakelists.txt
                  file you need to to<br>
                  set the GUI type to win32. Look at the documentation
                  for cmake to get<br>
                  an idea of what you should write.<br>
                  <br>
                  Mike Jackson<br>
                  <a moz-do-not-send="true"
                    href="http://Www.bluequartz.net" target="_blank">Www.bluequartz.net</a><br>
                  <div>
                    <div><br>
                      On Wednesday, April 27, 2011, G G &lt;<a
                        moz-do-not-send="true"
                        href="mailto:greenlander1986@gmail.com"
                        target="_blank">greenlander1986@gmail.com</a>&gt;
                      wrote:<br>
                      &gt; I have tried it, but I ran console window
                      again :(<br>
                      &gt;<br>
                      &gt; 2011/4/27 G G &lt;<a moz-do-not-send="true"
                        href="mailto:greenlander1986@gmail.com"
                        target="_blank">greenlander1986@gmail.com</a>&gt;<br>
                      &gt;<br>
                      &gt; Thank you very much, I will try it :)<br>
                      &gt; Do you know some article about it? I wrote
                      some thesis and it would be nice, if I have some
                      reference for it...<br>
                      &gt;<br>
                      &gt; 2011/4/27 Lodron, Gerald &lt;<a
                        moz-do-not-send="true"
                        href="mailto:Gerald.Lodron@joanneum.at"
                        target="_blank">Gerald.Lodron@joanneum.at</a>&gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt; Qt runs only in console mode, if you want to
                      hide console<br>
                      &gt; you can write a bat file which starts the exe
                      like this:<br>
                      &gt;<br>
                      &gt; start MyPropgram.exe<br>
                      &gt;<br>
                      &gt; Then the program does not wait for the return
                      value of the<br>
                      &gt; MyProgram.exe console<br>
                      &gt; best regards<br>
                      &gt;<br>
                      &gt;<br>
                      &gt; Von: <a moz-do-not-send="true"
                        href="mailto:vtkusers-bounces@vtk.org"
                        target="_blank">vtkusers-bounces@vtk.org</a><br>
                      &gt; [mailto:<a moz-do-not-send="true"
                        href="mailto:vtkusers-bounces@vtk.org"
                        target="_blank">vtkusers-bounces@vtk.org</a>] Im
                      Auftrag von G G<br>
                      &gt; Gesendet:<br>
                      &gt; Mittwoch, 27. April 2011 12:57<br>
                      &gt; An: <a moz-do-not-send="true"
                        href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
                      &gt; Betreff:<br>
                      &gt; [vtkusers] QT + VKT + ITK + VS2008<br>
                      &gt;<br>
                      &gt;<br>
                      &gt; Hi I have some project with QT+VTK+ITK and I
                      compile it in Visual<br>
                      &gt; Studio 2008. I create solution with CMake. It
                      works fine. But I compile it and<br>
                      &gt; run. When I run it, I have GUI window and
                      console window. So I have question.<br>
                      &gt; How to disable console window?<br>
                      &gt;<br>
                      &gt; I think, that it is because of CMake, but<br>
                      &gt; I dont know very well.<br>
                      &gt; I tried to used this<br>
                      &gt; <a moz-do-not-send="true"
href="http://www.qtforum.org/article/18473/tutorial-for-using-qt-with-vtk.html"
                        target="_blank">http://www.qtforum.org/article/18473/tutorial-for-using-qt-with-vtk.html</a><br>
                      &gt; But<br>
                      &gt; when I tried to compile it, it gave me many
                      errors...<br>
                      &gt; Do you know some<br>
                      &gt; complete progress, how to compile it?<br>
                      &gt; Or how to disable console<br>
                      &gt; window?<br>
                      &gt;<br>
                      &gt; I dont have console window because of it get
                      me qWarning<br>
                      &gt;<br>
                      &gt;<br>
                      &gt; QObject::killTimers: timers cannot be stopped
                      from another<br>
                      &gt; thread<br>
                      &gt;<br>
                      &gt; when I exit application from console window.<br>
                      &gt; When I exit<br>
                      &gt; application from GUI console window freeze :(<br>
                      &gt;<br>
                      &gt; Thank you all for<br>
                      &gt; help<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      &gt;<br>
                      <br>
                    </div>
                  </div>
                  <font color="#888888">--<br>
_________________________________________________________<br>
                    Mike Jackson &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a
                      moz-do-not-send="true"
                      href="mailto:mike.jackson@bluequartz.net"
                      target="_blank">mike.jackson@bluequartz.net</a><br>
                    BlueQuartz Software &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a
                      moz-do-not-send="true"
                      href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
                    Principal Software Engineer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dayton,
                    Ohio<br>
                  </font></blockquote>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>