MantisBT - CMake
View Issue Details
0014420CMakeCMakepublic2013-09-17 08:202014-03-05 09:58
mar-na 
Patrick R. Gansterer 
highmajoralways
closedfixed 
 
CMake 2.8.12CMake 2.8.12 
0014420: testCCompiler failed under WinCE with linker error
In CMake 2.8.11 it works but in 2.8.11.20130916-gcfe70 failed it.

Generation of VS project fles for WinCE STANDARDSDK_500 (ARMV41) failed with

LNK2001: unresolved external symbol mainACRTStartup
Create simple HelloWorld application and try to generate the VS 2008 project files with CMake-gui for it.

Used generator: Visual Studio 2008 STANDARDSDK_500 (ARMV41)

Error Message:

CMake Error at C:/data/TMP/cmake-2.8.11.20130916-gcfe70-win32-x86/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "C:/Programme/Microsoft Visual Studio
  9.0/VC/ce/bin/x86_arm/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/data/cmake_wince/HelloWorld/build/cmake_trunk_wince/CMakeFiles/CMakeTmp

  

  Run Build Command:C:\PROGRA~1\MICROS~1.0\Common7\IDE\devenv.com
  CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3766279777

  


  Microsoft (R) Visual Studio Version 9.0.30729.1.


  Copyright (C) Microsoft Corp. All rights reserved.


  ------ Build started: Project: cmTryCompileExec3766279777, Configuration:
  Debug STANDARDSDK_500 (ARMV4I) ------


  Compiling...


  Microsoft (R) C/C++ Optimizing Compiler Version 15.00.20720 for ARM


  Copyright (C) Microsoft Corporation. All rights reserved.


  cl /Od /D "_WIN32_WCE=0x500" /D "UNDER_CE" /D "THUMB" /D "_THUMB_" /D
  "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /MDd
  /fp:fast /GR- /Fo"cmTryCompileExec3766279777.dir\Debug\\"
  /Fd"cmTryCompileExec3766279777.dir\Debug/vc80.pdb" /W3 /c /Zi /TC


     .\testCCompiler.c


  testCCompiler.c


  Linking...


  LINK : error LNK2001: unresolved external symbol mainACRTStartup


  
  C:\data\cmake_wince\HelloWorld\build\cmake_trunk_wince\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3766279777.exe
  : fatal error LNK1120: 1 unresolved externals


  Build log was saved at
  "file://c:\data\cmake_wince\HelloWorld\build\cmake_trunk_wince\CMakeFiles\CMakeTmp\cmTryCompileExec3766279777.dir\Debug\BuildLog.htm" [^]



  cmTryCompileExec3766279777 - 2 error(s), 0 warning(s)


  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
  ==========


  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


Configuring incomplete, errors occurred!
See also "C:/data/cmake_wince/HelloWorld/build/cmake_trunk_wince/CMakeFiles/CMakeOutput.log".
See also "C:/data/cmake_wince/HelloWorld/build/cmake_trunk_wince/CMakeFiles/CMakeError.log".
No tags attached.
related to 0014088closed Patrick R. Gansterer WinCE Visual Studio generators emit incorrect project if /ENTRY option is changed 
related to 0014436closed Patrick R. Gansterer Missing ARCHFAM preprocessor definition in WinCE Visual Studio generators (armv41) 
zip HelloWorld.zip (677) 2013-09-17 08:20
https://public.kitware.com/Bug/file/4881/HelloWorld.zip
Issue History
2013-09-17 08:20mar-naNew Issue
2013-09-17 08:20mar-naFile Added: HelloWorld.zip
2013-09-17 08:42Brad KingAssigned To => Patrick R. Gansterer
2013-09-17 08:42Brad KingStatusnew => assigned
2013-09-23 09:06Brad KingNote Added: 0033864
2013-09-23 09:06Brad KingRelationship addedrelated to 0014088
2013-09-23 10:59Robert MaynardPrioritynormal => high
2013-09-23 10:59Robert MaynardTarget Version => CMake 2.8.12
2013-09-23 16:12Patrick R. GanstererNote Added: 0033865
2013-09-23 16:34Brad KingNote Added: 0033866
2013-09-23 16:39Patrick R. GanstererNote Added: 0033867
2013-09-23 16:45Patrick R. GanstererNote Added: 0033868
2013-09-23 17:17Brad KingNote Added: 0033869
2013-09-23 17:18Brad KingStatusassigned => resolved
2013-09-23 17:18Brad KingResolutionopen => fixed
2013-09-23 17:18Brad KingFixed in Version => CMake 2.8.12
2013-09-24 10:43Brad KingRelationship addedrelated to 0014436
2014-03-05 09:58Robert MaynardNote Added: 0035265
2014-03-05 09:58Robert MaynardStatusresolved => closed

Notes
(0033864)
Brad King   
2013-09-23 09:06   
A possible cause of this regression is this change:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34969cf1 [^]

that affects entry point selection.
(0033865)
Patrick R. Gansterer   
2013-09-23 16:12   
Fix merged into next: http://cmake.org/gitweb?p=cmake.git;a=commit;h=8ba55f66ad4c31747d8ca9f084699a74fb43828f [^]
(0033866)
Brad King   
2013-09-23 16:34   
Patrick, the change linked in 0014420:0033865:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=200d3976 [^]

seems to revert part of this commit:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fcf0ab0 [^]

which was trying to do something specific to the version of the compiler.

Either all of the older change should be reverted or the version number test should be fixed. Please also refer back to the commit causing the regression in your commit message with text like

 ...commit 8fcf0ab0 (Add support for new Windows CE compiler, 2013-08-04) ...
(0033867)
Patrick R. Gansterer   
2013-09-23 16:39   
ARGHHH, that happens if you only test with VS2005 and VS2008. :-(
Thx for cross-checking, I'll push the correct change.
(0033868)
Patrick R. Gansterer   
2013-09-23 16:45   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=016cd6dd7224c48aec5121f6ca7fd0f958f7e0ab [^]
(0033869)
Brad King   
2013-09-23 17:17   
Okay, I squashed the fixes into one commit:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e63cf5f0 [^]

Now the net diff only updates the version number.
(0035265)
Robert Maynard   
2014-03-05 09:58   
Closing resolved issues that have not been updated in more than 4 months