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 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 href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you, I tried it ;)<div><div></div><div class="h5"><br><br><div class="gmail_quote">2011/4/27 Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 href="http://Www.bluequartz.net" target="_blank">Www.bluequartz.net</a><br>
<div><div></div><div><br>
On Wednesday, April 27, 2011, G G <<a 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 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 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 href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a><br>
> [mailto:<a 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 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 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 href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software <a 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>