VS, WINCE: Fix entry point for Unicode builds
When _UNICODE is defined VS uses wmain instead of main as the entry function. To make this correctly work on WindowsCE EntryPointSymbol needs to be set to mainWCRTStartup instead of mainACRTStartup for console applications and to wWinMainCRTStartup instead of WinMainCRTStartup for GUI applications. Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
This commit is contained in:
parent
433c6d4689
commit
681cda02bf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue