MantisBT - CMake
View Issue Details
0015733CMakeCMakepublic2015-09-10 04:122016-06-10 14:31
M. Schneider 
Kitware Robot 
normalminoralways
closedmoved 
CMake 3.3.1 
 
0015733: Linker EntryPoint inconsistency
Inconsistency occurs for Windows CE when creating a project for building an executable using Unicode. This causes build errors for builds using VS generator.

Because of portability reason to standard c code, console executables on CE use mainACRTStartup as entry point.

For Ninja Generator this linker flag is set properly (defined in Windows-MSVC.cmake line 39ff, applied in cmMakefileExecutableTargetGenerator.cxx 199ff) depending on system name - using CMAKE_CREATE_CONSOLE_EXE variable.

If VS2012 project is set as generator entry point is set to mainWCRTStartup (cmVisualStudio10TargetGenerator.cxx line 2396ff).

From my point of view all generators should create same flags although VS build can be fixed using

SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/ENTRY:mainACRTStartup")

for WinCE in corresponding CMakeLists.txt.


An idea is instead of using a separate logic for determining entry point, stick to your CMAKE_CREATE_CONSOLE_EXE/CMAKE_CREATE_WIN32_EXE variables.
No tags attached.
Issue History
2015-09-10 04:12M. SchneiderNew Issue
2015-09-10 09:00Brad KingNote Added: 0039391
2016-06-10 14:29Kitware RobotNote Added: 0042837
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039391)
Brad King   
2015-09-10 09:00   
Relevant commit:

 VS, WINCE: Fix entry point for Unicode builds
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=681cda02 [^]
(0042837)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.