Index: tolbase/generic/CMakeLists.txt
===================================================================
--- tolbase/generic/CMakeLists.txt	(revision 4fce39e5dccae65b6a9274fbc31c7557c5390b85)
+++ tolbase/generic/CMakeLists.txt	(revision 9b614daf93ac825703b1f4ef2f169080f82a738b)
@@ -6,5 +6,7 @@
 message( STATUS "Using TK_LIBRARY = ${TCL_LIBRARY}" )
 
-if ( NOT WIN32 )
+if ( WIN32 )
+  set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -mwindows" )
+else ( WIN32 )
 	# use, i.e. don't skip the full RPATH for the build tree
   SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
@@ -20,5 +22,4 @@
   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
-
   # the RPATH to be used when installing, but only if it's not a system directory
   LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
@@ -26,5 +27,5 @@
      SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
   ENDIF("${isSystemDir}" STREQUAL "-1")
-endif( NOT WIN32 )
+endif( WIN32 )
 
 add_executable( tolbase tolbase.c )
Index: tolbase/generic/tolbase.c
===================================================================
--- tolbase/generic/tolbase.c	(revision 4fce39e5dccae65b6a9274fbc31c7557c5390b85)
+++ tolbase/generic/tolbase.c	(revision 9b614daf93ac825703b1f4ef2f169080f82a738b)
@@ -14,4 +14,6 @@
 #include "tk.h"
 #include "locale.h"
+#include <windows.h>
+
 
 #ifdef TK_TEST
@@ -37,4 +39,6 @@
  */
 
+#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
+
 int
 main(argc, argv)
@@ -53,4 +57,7 @@
 #endif
     extern int TK_LOCAL_APPINIT _ANSI_ARGS_((Tcl_Interp *interp));
+
+    //HWND hwnd = GetConsoleWindow();
+    //ShowWindow(hwnd, 0);
     
     /*
