diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317bc..2ef27e2a9 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2267,7 +2267,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + } } } else @@ -2282,7 +2289,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + } } } else