简体   繁体   English

Visual Studio 2013:CL.exe退出,代码为-1073741515

[英]Visual Studio 2013: CL.exe exited with code -1073741515

I have a fresh Windows 8.1 Pro x64 install with a fresh Visual Studio 2013 Pro. 我有一个全新的 Windows 8.1 Pro x64安装与新的 Visual Studio 2013专业版。 When trying to compile a project with Platform Toolset to Windows7.1SDK I'm getting 当我尝试使用Platform Toolset将项目编译到Windows7.1SDK时,我得到了

Error   1   error MSB6006: "CL.exe" exited with code -1073741515.   C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets   57  5   MenuBrowser

I tried running the supplied "Windows SDK Configuration Tool" and besides getting an error about Visual Studio 2005 and 2008 not being installed I think it did its job. 我尝试运行提供的“Windows SDK配置工具”,除了得到关于Visual Studio 2005和2008未安装的错误之外,我认为它确实起了作用。

I tried manually editing the registry: 我尝试手动编辑注册表:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows

where I manually put CurrentInstallFolder as C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\ and CurrentVersion as 7.1.7600.0.30514 . 我手动将CurrentInstallFolder作为C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\CurrentVersion作为7.1.7600.0.30514 If I look at the project properties and click the different paths / variables in there -> more -> Macros, I can see that $(WindowsSdkDir) is correct. 如果我查看项目属性并单击其中的不同路径/变量 - >更多 - >宏,我可以看到$(WindowsSdkDir)是正确的。

Any idea as to what I should try? 知道我应该尝试什么吗? Never ran into this problem on the old development computer with Windows 7 and VS 2012. 从未在使用Windows 7和VS 2012的旧开发计算机上遇到此问题。

LE as a note, if I try a new project with the v120 tools, it works, but I need the Windows7.1SDK tools. LE作为注释,如果我使用v120工具尝试新项目,它可以工作,但我需要Windows7.1SDK工具。

When trying to compile a project with Platform Toolset to Windows7.1SDK... 尝试使用Platform Toolset将项目编译为Windows7.1SDK时...

That's not a valid selection in a "fresh" install for VS2013. 这不是VS2013“全新”安装中的有效选择。 Not very clear what you've been doing, it certainly isn't "fresh" anymore. 不太清楚你一直在做什么,它肯定不再“新鲜”了。 Do treat Regedit.exe as a loaded weapon, the registry key set that configures VS has been getting pretty doggone convoluted as of late. 将Regedit.exe视为一种加载的武器,配置VS的注册表键集最近变得非常糟糕。

The compiler crashes with -1073741515 == 0xC0000135 == STATUS_DLL_NOT_FOUND. 编译器与-1073741515 == 0xC0000135 == STATUS_DLL_NOT_FOUND崩溃。 That's a pretty serious mishap of course, it should never occur when you target SDK 7.1 since that still uses the same compiler, only the SDK directory is changed. 当然,这是一个非常严重的事故,当你以SDK 7.1为目标时它永远不会发生,因为它仍然使用相同的编译器,只更改了SDK目录。 The compiler itself, as well as the DLLs it uses, are not part of the SDK and only are provided if the machine doesn't have VS installed. 编译器本身及其使用的DLL不是SDK的一部分,只有在机器没有安装VS时才提供。 You can use SysInternals' Process Monitor to diagnose this, you'll see the CL.EXE process searching for a DLL and not finding it. 您可以使用SysInternals的进程监视器来诊断它,您将看到CL.EXE进程搜索DLL而不是找到它。

The correct way to target 7.1 is to use the v120_xp toolset selection. 目标7.1的正确方法是使用v120_xp工具集选择。 That builds programs that can still run on XP, it automatically also selects the 7.1A SDK that was installed on your machine. 这可以构建仍可在XP上运行的程序,它还会自动选择计算机上安装的7.1A SDK。 Do try to undo the changes you've made. 请尝试撤消您所做的更改。

Referencing Yodans solution from How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK? 使用Windows SDK参考如何使用VS2012中的v90平台工具集在没有VS2008的情况下构建 Yodans解决方案 :

As pointed out by Hans Passant cl.exe looks for mspdb100.dll (among others) and does not find them. 正如Hans Passant所指出的,cl.exe会查找mspdb100.dll(以及其他内容)并且找不到它们。 The needed files are in the directory mentioned in 7. below: 所需文件位于以下7.中提到的目录中:

My working setup: 我的工作设置:

  1. VS2013 needs to use VS2010 libs VS2013需要使用VS2010库
  2. Using WinSDK 7.1 build tools (v100) in VS2013 在VS2013中使用WinSDK 7.1构建工具(v100)
  3. clean install, uninstalling everything mentioned in the sdk release notes (can be downloaded at http://www.microsoft.com/en-us/download/details.aspx?id=8279 under category Details) 干净安装,卸载sdk发行说明中提到的所有内容(可以在http://www.microsoft.com/en-us/download/details.aspx?id=8279下的类别详细信息下载)
    1. Microsoft Windows SDK for Windows 7 (7.1) (the Windows SDK core-component files) 适用于Windows 7的Microsoft Windows SDK(7.1)(Windows SDK核心组件文件)
    2. Application Verifier 应用验证程序
    3. Debugging Tools for Windows 适用于Windows的调试工具
    4. Windows Performance Toolkit Windows性能工具包
    5. Microsoft Help Viewer 1.0 Microsoft Help Viewer 1.0
    6. Microsoft Visual C++ 2010 Redistributable Microsoft Visual C ++ 2010 Redistributable
    7. Microsoft Visual C++ 2010 Standard Edition Microsoft Visual C ++ 2010标准版
    8. Additionally removed all .NET and VC++ related MS Software (not tested if necessary) 另外删除了所有与.NET和VC ++相关的MS软件(如有必要,不进行测试)
  4. choosing Windows7.1SDK as Platform Toolset in VS2013 在VS2013中选择Windows7.1SDK作为平台工具集
  5. error MSB6006: "CL.exe" exited with code -1073741515 错误MSB6006:“CL.exe”退出,代码为-1073741515
  6. cl.exe looks for one of msobj100.dll, mspdb100.dll, mspdbcore.dll and mspdbsrv.exe cl.exe查找msobj100.dll,mspdb100.dll,mspdbcore.dll和mspdbsrv.exe之一
  7. Added to PATH: C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE 添加到PATH:C:\\ Program Files(x86)\\ Microsoft Visual Studio 10.0 \\ Common7 \\ IDE
  8. Build works and binary is usable! 构建工作和二进制是可用的!

A mistake I did: 我做的一个错误:

  1. copied files in 6. above to C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin, believing this directory is in PATH, but it was not! 将上面6.中的文件复制到C:\\ Program Files(x86)\\ Microsoft Visual Studio 10.0 \\ VC \\ bin,认为这个目录是在PATH中,但事实并非如此!
  2. So better do as sugested in 7. above or by Yodan in How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK? 使用Windows SDK,如果在没有VS2008的VS2012中使用v90平台工具集构建如何在上面或者Yodan中更好地进行操作

The following steps work for me in VS 2017. 以下步骤适用于VS 2017。

1.Close VS 2017. 2.Restart machine. 1.关闭VS 2017. 2.Restart机器。 3.Open solution in VS 2017. 4.Build the project. 3.在VS 2017中打开解决方案.4。建立项目。 This time I didn't get following error and it builds successfully. 这次我没有得到以下错误,并且它成功构建。

error msb6006 "link.exe" exited with code -1073741819. 错误msb6006“link.exe”已退出,代码为-1073741819。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM