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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to