[CMake] cmake c compiler test error

Wen Liu wpliu25 at gmail.com
Fri Aug 2 21:51:55 EDT 2013


Hi,


I'm using Cmake 2.8.11.2 to configure a c++ project with compiler VS9 2008
Win64 on a 64bit Windows 7 machine but run into the error below (full
printout attached). The log file referred to is nonexistent. Please advise.


FYI: Uninstalling and reinstalling cmake does not resolve the issue nor
deleting or using another project's CMakeCache.txt


Thank you for your time.


Wen


-------------------------------------------------------------------------------------------------


The C compiler identification is MSVC 15.0.30729.1

The CXX compiler identification is MSVC 15.0.30729.1

Check for working C compiler using: Visual Studio 9 2008 Win64

Check for working C compiler using: Visual Studio 9 2008 Win64 -- broken

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):

  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio

  9.0/VC/bin/cl.exe" is not able to compile a simple test program.


  It fails with the following output:


   Change Dir:
C:/Users/wenl/Projects/Ducati/development/ISI-API-ImagingLab-ISIAPI-build/CMakeFiles/CMakeTmp

...


  1>.\cmTryCompileExec1913155671.dir\Debug\testCCompiler.obj : fatal error

  LNK1112: module machine type 'X86' conflicts with target machine type

  'x64'


...

Configuring incomplete, errors occurred!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130802/430de96a/attachment-0001.htm>
-------------- next part --------------
The C compiler identification is MSVC 15.0.30729.1
The CXX compiler identification is MSVC 15.0.30729.1
Check for working C compiler using: Visual Studio 9 2008 Win64
Check for working C compiler using: Visual Studio 9 2008 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
  9.0/VC/bin/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Users/wenl/Projects/Ducati/development/ISI-API-ImagingLab-ISIAPI-build/CMakeFiles/CMakeTmp

  

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

  

  Microsoft (R) Visual Studio Version 9.0.30729.1.

  Copyright (C) Microsoft Corp.  All rights reserved.

  1>------ Build started: Project: cmTryCompileExec1913155671, Configuration:
  Debug x64 ------

  1>Compiling...

  1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
  80x86

  1>Copyright (C) Microsoft Corporation.  All rights reserved.

  1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\""
  /D "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec1913155671.dir\Debug\\"
  /Fd"C:\Users\wenl\Projects\Ducati\development\ISI-API-ImagingLab-ISIAPI-build\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec1913155671.pdb"
  /W3 /c /Zi /TC ".\testCCompiler.c"

  1>testCCompiler.c

  1>Compiling manifest to resources...

  1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385

  1>Copyright (C) Microsoft Corporation.  All rights reserved.

  1>Linking...

  1>.\cmTryCompileExec1913155671.dir\Debug\testCCompiler.obj : fatal error
  LNK1112: module machine type 'X86' conflicts with target machine type
  'x64'

  1>Build log was saved at
  "file://c:\Users\wenl\Projects\Ducati\development\ISI-API-ImagingLab-ISIAPI-build\CMakeFiles\CMakeTmp\cmTryCompileExec1913155671.dir\Debug\BuildLog.htm"


  1>cmTryCompileExec1913155671 - 1 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:3 (project)


Configuring incomplete, errors occurred!


More information about the CMake mailing list