1

cmake-gui で構成中に cmake エラーが発生しました:

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/admin/Desktop/myproject/CMakeFiles/CMakeTmp



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



  Microsoft (R) Visual Studio Version 9.0.21022.8.

  Copyright (C) Microsoft Corp.  All rights reserved.

  1>------ Build started: Project: cmTryCompileExec, Configuration:
  Debug Win32 ------

  1>Compiling...

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

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

  1>cl /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /MT
  /Fo"cmTryCompileExec.dir\Debug\\"
  /Fd"C:\Users\admin\Desktop\myproject\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.pdb"
  /c /TC .\testCCompiler.c

  1>testCCompiler.c

  1>Linking...

  1>LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

  1>Build log was saved at
  "file://C:\Users\admin\Desktop\myproject\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"


  1>cmTryCompileExec - 1 error(s), 0 warning(s)

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

vsコンパイラに必要なライブラリを見つけさせることができないのはなぜですか?

4

1 に答える 1

0

Visual Studio 2008 のインストールで、rc.exe が見つからないというエラーが発生しました。解決しました、上記の問題を解決しました。

ご迷惑をおかけして申し訳ありません。

于 2013-04-30T16:18:59.277 に答える