[cmake-developers] [CMake 0015013]: subsystem windowsce is not set for dll only for exes, this makes dll not loadable on wec2013 (wince8)
Mantis Bug Tracker
mantis at public.kitware.com
Thu Jul 10 12:05:34 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15013
======================================================================
Reported By: Gunnar Roth
Assigned To:
======================================================================
Project: CMake
Issue ID: 15013
Category: CMake
Reproducibility: always
Severity: major
Priority: urgent
Status: new
======================================================================
Date Submitted: 2014-07-10 12:05 EDT
Last Modified: 2014-07-10 12:05 EDT
======================================================================
Summary: subsystem windowsce is not set for dll only for
exes, this makes dll not loadable on wec2013 (wince8)
Description:
the subsystem switch for the linker is only set for executables but not for
dlls.
this was no problem for ce < wec2013. but wec2013 checks for correct subsystem.
you can see this informations using depends.exe from dependancywalker.com
Steps to Reproduce:
compile a project containg a dll with a wec2013 sdk. this dll will not be loaded
on wec2013.
Additional Information:
this problem can be fixed with this simple patch:
--- a\share\cmake-3.0\Modules/Platform/Windows-MSVC.cmake
+++ b\share\cmake-3.0\Modules/Platform/Windows-MSVC.cmake
@@ -37,12 +37,13 @@
endif()
set(WIN32 1)
if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
- set(CMAKE_CREATE_WIN32_EXE "/subsystem:windowsce /entry:WinMainCRTStartup")
- set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:windowsce /entry:mainACRTStartup")
+ set(CMAKE_CREATE_WIN32_EXE "/entry:WinMainCRTStartup")
+ set(CMAKE_CREATE_CONSOLE_EXE "/entry:mainACRTStartup")
+ set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}
/subsystem:windowsce")
set(WINCE 1)
else()
set(CMAKE_CREATE_WIN32_EXE "/subsystem:windows")
set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:console")
endif()
CMAKE_EXE_LINKER_FLAGS_INIT is inherited by the dll settings but
CMAKE_CREATE_WIN32_EXE or CMAKE_CREATE_CONSOLE_EXE is of course not.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-10 12:05 Gunnar Roth New Issue
======================================================================
More information about the cmake-developers
mailing list