如何在同一台机器上运行Visual Studio 2015和2017?

时间:2017-04-13 05:24:42

标签: visual-studio visual-studio-2015 visual-studio-2017

我在运行Windows Server 2012 R2的服务器上安装了Visual Studio Community 2015。我确认工具链能够构建我的C ++项目(使用CMake)。

然后我安装了Visual Studio Community 2017并确认工具链也正常工作。然而,令我沮丧的是,我很快发现2015年的工具链不再有效。尝试构建我的项目会导致以下错误:

-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
  14.0/VC/bin/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/Users/Nathan/Documents/repositories/qmdnsengine/build/CMakeFiles/CMakeTmp



  Run Build Command:"nmake" "/NOLOGO" "cmTC_614a9\fast"

        "C:\Program Files (x86)\Microsoft Visual Studio
  14.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\cmTC_614a9.dir\build.make
  /nologo -L CMakeFiles\cmTC_614a9.dir\build

  Building C object CMakeFiles/cmTC_614a9.dir/testCCompiler.c.obj

        C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe
  @C:\Users\Nathan\AppData\Local\Temp\2\nmB42E.tmp

  testCCompiler.c

  Linking C executable cmTC_614a9.exe

        "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
  --intdir=CMakeFiles\cmTC_614a9.dir --manifests --
  C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo
  @CMakeFiles\cmTC_614a9.dir\objects1.rsp
  @C:\Users\Nathan\AppData\Local\Temp\2\nmB577.tmp

  RC Pass 1 failed to run.

  NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' :
  return code '0xffffffff'

  Stop.

  NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
  14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'

  Stop.





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


-- Configuring incomplete, errors occurred!
See also "C:/Users/Nathan/Documents/repositories/qmdnsengine/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Nathan/Documents/repositories/qmdnsengine/build

这个错误意味着什么,我将如何解决它?

0 个答案:

没有答案