<br><font size=1 face="Courier New">Dear CMake users,</font>
<br>
<br>
<br><font size=1 face="Courier New">I am using CMake as the build tool for a GUI application written in Qt (on Linux-GCC 3.3).</font>
<br>
<br><font size=1 face="Courier New">When I build the application on Windows XP (MSVC++.NET 7.1) it will compile just fine with no errors, however when</font>
<br><font size=1 face="Courier New">I run the app I get the command window showing up as well as the GUI. In my main program I am using main().</font>
<br>
<br><font size=1><tt>When I replace the line:</tt></font>
<br>
<br><font size=1><tt>ADD_EXECUTABLE(viewer VIEWER_SRCS)</tt></font>
<br>
<br><font size=1><tt>in my CMakeLists.txt file with this:</tt></font>
<br>
<br><font size=1><tt>ADD_EXECUTABLE(viewer WIN32 VIEWER_SRCS)</tt></font>
<br>
<br><font size=1 face="Courier New">however, I get the following linker error:</font>
<br>
<br>
<br><font size=1 face="Courier New">------ Build started: Project: viewer, Configuration: Release Win32 ------</font>
<br>
<br><font size=1 face="Courier New">Compiling...</font>
<br><font size=1 face="Courier New">main.cpp</font>
<br><font size=1 face="Courier New">Linking...</font>
<br><font size=1 face="Courier New">&nbsp; &nbsp;Creating library Release\viewer.lib and object Release\viewer.exp</font>
<br><font size=1 face="Courier New">MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup</font>
<br><font size=1 face="Courier New">Release\viewer.exe : fatal error LNK1120: 1 unresolved externals</font>
<br>
<br><font size=1 face="Courier New">viewer - 2 error(s), 0 warning(s)</font>
<br>
<br>
<br><font size=2 face="sans-serif">How do I get rid of the command window without making my code platform specific?</font>
<br>
<br><font size=2 face="sans-serif">I am using version 1.8 patch 3 of CMake.</font>
<br>
<br><font size=2 face="sans-serif">Thanks and best regards,</font>
<br>
<br><font size=2 face="sans-serif">Nick</font>
<br>