<!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 écrit :
<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 1 error LNK2019: unresolved external symbol
_WinMain@16 referenced in function ___tmainCRTStartup
MSVCRT.lib Application<br>
Error 2 fatal error LNK1120: 1 unresolved externals
C:\DP-ITK-APPS\src\my_test\bin\Release\Application.exe
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"><<a
moz-do-not-send="true"
href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>></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"><<a moz-do-not-send="true"
href="mailto:mike.jackson@bluequartz.net"
target="_blank">mike.jackson@bluequartz.net</a>></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 <<a
moz-do-not-send="true"
href="mailto:greenlander1986@gmail.com"
target="_blank">greenlander1986@gmail.com</a>>
wrote:<br>
> I have tried it, but I ran console window
again :(<br>
><br>
> 2011/4/27 G G <<a moz-do-not-send="true"
href="mailto:greenlander1986@gmail.com"
target="_blank">greenlander1986@gmail.com</a>><br>
><br>
> Thank you very much, I will try it :)<br>
> Do you know some article about it? I wrote
some thesis and it would be nice, if I have some
reference for it...<br>
><br>
> 2011/4/27 Lodron, Gerald <<a
moz-do-not-send="true"
href="mailto:Gerald.Lodron@joanneum.at"
target="_blank">Gerald.Lodron@joanneum.at</a>><br>
><br>
><br>
><br>
><br>
><br>
><br>
> Qt runs only in console mode, if you want to
hide console<br>
> you can write a bat file which starts the exe
like this:<br>
><br>
> start MyPropgram.exe<br>
><br>
> Then the program does not wait for the return
value of the<br>
> MyProgram.exe console<br>
> best regards<br>
><br>
><br>
> Von: <a moz-do-not-send="true"
href="mailto:vtkusers-bounces@vtk.org"
target="_blank">vtkusers-bounces@vtk.org</a><br>
> [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>
> Gesendet:<br>
> Mittwoch, 27. April 2011 12:57<br>
> An: <a moz-do-not-send="true"
href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
> Betreff:<br>
> [vtkusers] QT + VKT + ITK + VS2008<br>
><br>
><br>
> Hi I have some project with QT+VTK+ITK and I
compile it in Visual<br>
> Studio 2008. I create solution with CMake. It
works fine. But I compile it and<br>
> run. When I run it, I have GUI window and
console window. So I have question.<br>
> How to disable console window?<br>
><br>
> I think, that it is because of CMake, but<br>
> I dont know very well.<br>
> I tried to used this<br>
> <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>
> But<br>
> when I tried to compile it, it gave me many
errors...<br>
> Do you know some<br>
> complete progress, how to compile it?<br>
> Or how to disable console<br>
> window?<br>
><br>
> I dont have console window because of it get
me qWarning<br>
><br>
><br>
> QObject::killTimers: timers cannot be stopped
from another<br>
> thread<br>
><br>
> when I exit application from console window.<br>
> When I exit<br>
> application from GUI console window freeze :(<br>
><br>
> Thank you all for<br>
> help<br>
><br>
><br>
><br>
><br>
<br>
</div>
</div>
<font color="#888888">--<br>
_________________________________________________________<br>
Mike Jackson <a
moz-do-not-send="true"
href="mailto:mike.jackson@bluequartz.net"
target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software <a
moz-do-not-send="true"
href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer 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>