diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 3d1380c6d..2d76c7a34 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -228,7 +228,3 @@ int main(int argc, char* argv[])
return require;
}
#endif
-
-#ifdef ADD_MAINCRTSTARTUP
-void mainCRTStartup() {}
-#endif
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 142a5c5ab..5e70a4196 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -210,7 +210,3 @@ int main(int argc, char* argv[])
(void)argv;
return require;
}
-
-#ifdef ADD_MAINCRTSTARTUP
-extern "C" void mainCRTStartup() {}
-#endif
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 40e4f5aac..609f35bf7 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -141,7 +141,7 @@ Id flags: ${testflags}
set(id_toolset "")
endif()
if(CMAKE_VS_WINCE_VERSION)
- set(id_definitions "ADD_MAINCRTSTARTUP")
+ set(id_entrypoint "mainACRTStartup")
set(id_subsystem 9)
else()
set(id_subsystem 1)
diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in
index 5b68e8637..3e2b34a62 100644
--- a/Modules/CompilerId/VS-7.vcproj.in
+++ b/Modules/CompilerId/VS-7.vcproj.in
@@ -24,7 +24,6 @@