Visual Studio 2013: CL.exe exited with code -1073741515
Solution 1
When trying to compile a project with Platform Toolset to Windows7.1SDK...
That's not a valid selection in a "fresh" install for 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.
The compiler crashes with -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. 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. You can use SysInternals' Process Monitor to diagnose this, you'll see the CL.EXE process searching for a DLL and not finding it.
The correct way to target 7.1 is to use the v120_xp toolset selection. That builds programs that can still run on XP, it automatically also selects the 7.1A SDK that was installed on your machine. Do try to undo the changes you've made.
Solution 2
Referencing Yodans solution from How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?:
As pointed out by Hans Passant cl.exe looks for mspdb100.dll (among others) and does not find them. The needed files are in the directory mentioned in 7. below:
My working setup:
- VS2013 needs to use VS2010 libs
- Using WinSDK 7.1 build tools (v100) in VS2013
- 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)
- Microsoft Windows SDK for Windows 7 (7.1) (the Windows SDK core-component files)
- Application Verifier
- Debugging Tools for Windows
- Windows Performance Toolkit
- Microsoft Help Viewer 1.0
- Microsoft Visual C++ 2010 Redistributable
- Microsoft Visual C++ 2010 Standard Edition
- Additionally removed all .NET and VC++ related MS Software (not tested if necessary)
- choosing Windows7.1SDK as Platform Toolset in VS2013
- error MSB6006: "CL.exe" exited with code -1073741515
- cl.exe looks for one of msobj100.dll, mspdb100.dll, mspdbcore.dll and mspdbsrv.exe
- Added to PATH: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
- Build works and binary is usable!
A mistake I did:
- 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!
- 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?
foxx1337
Updated on July 09, 2022Comments
-
foxx1337 almost 2 years
I have a fresh Windows 8.1 Pro x64 install with a fresh Visual Studio 2013 Pro. When trying to compile a project with Platform Toolset to Windows7.1SDK I'm getting
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.
I tried manually editing the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
where I manually put
CurrentInstallFolder
asC:\Program Files\Microsoft SDKs\Windows\v7.1\
andCurrentVersion
as7.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.Any idea as to what I should try? Never ran into this problem on the old development computer with Windows 7 and VS 2012.
L.E. as a note, if I try a new project with the v120 tools, it works, but I need the Windows7.1SDK tools.
-
foxx1337 about 10 yearsThank you! I only installed 7.1 sdk because I needed Platform Tools v100. I am not sure the 7.1 SDK includes them and I don't have a Visual Studio 2010 setup available.
-
user1703401 about 10 yearsI highly doubt it since the SDK installer in general pays attention to VS being installed. And wouldn't know beans about the way platform toolsets work, that was added later. The exit code loudly says "No!" of course.
-
foxx1337 about 10 yearsToday I Learned! Got Process Monitor, filtered by
cl.exe
, it wasCreateFile
ing without success for mspdb100.dll all over the place. I guess that's it! I'll fiddle with it some more (maybe even install 2010 Express) and then post some more comments as needed and mark the answer. -
Cees Timmerman over 8 yearsVisual Studio Community 2015 has the SDK as install feature.
-
dragon788 about 4 yearsSo dumb the amount of times that a reboot fixes Microsoft products. It has started happening more on macOS recently as well, but there's a reason IT Crowd was able to make such a meme out of "have you tried turning it off and on again?"