Visual Studio 2013: CL.exe exited with code -1073741515 - c++

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 as C:\Program Files\Microsoft SDKs\Windows\v7.1\ and CurrentVersion as 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.
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.

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.

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?

The following steps work for me in VS 2017.
1.Close VS 2017.
2.Restart machine.
3.Open solution in VS 2017.
4.Build the project.
This time I didn't get following error and it builds successfully.
error msb6006 "link.exe" exited with code -1073741819.

Related

fxc.exe not found by VS2017 in windows 10

I'm going to use the HelixToolkit.SharpDX with VS2017 in my Windows 10 workstation, when I attempt to build the solution, it will prompt the Assertion Failed error with "No fxc.exe found".
I have checked the installation option, Windows SDK has been included, nand I have downloaded and install again, and I can see the fxc.exe in "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64" & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86" folders, so it should be available for any windows version, but unfortunately, the same error reported.
However, I have also installed VS2017 in another Windows 7 machine, it works fine, and it has the fxc.exe in the same folder as my Windows 10 workstation, but it can be located by VS2017.
Is there any setting in VS2017 to locate the fxc.exe?
Or how can I fix this issue?
Copy fxc.exe in Bin\10.0.xxx\x86 to Bin\x86 to fix this issue. Because the HLSL compile tool hard coded the path.
One can find solution on helix toolkit github page.
Visual Studio 2017. Windows 10 SDK.
Missing fxc.exe issue with newest Windows 10 SDK:
Copy fxc.exe in C:\Program Files (x86)\Windows
Kits\10\Bin\10.0.xxx\x86 to C:\Program Files (x86)\Windows
Kits\10\bin\x86 to fix this issue. Because the HLSL compile tool hard
coded the path.
This seems to have been fixed in Visual Studio 2019 16.0.2, as of writing. Just have to make sure $(WindowsSDK_ExecutablePath) is pointing to the correct SDK directory and the build version that matches with the Targeted Platform in the Project Properties page.
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/a3032567-d8e7-4b01-81b7-0612047a6299/why-do-we-need-to-copypaste-fxcexe-from-bin100xxxxx0x86-to-binx86-directory-in-the?forum=windowssdk
Second post answered:
The executables that the C++ build process uses from the Windows SDK directory are MIDL.exe, MT.exe and RC.exe. If you digitally sign your executables then you will find signtool.exe here too. So I am kind of surprised that it finds some critical build tools correctly but others it fails to find.
My suggestion would be:
1) Verify that you are having this problem with your project in Visual Studio 2019 16.0.2 (the latest version at the time of writing) or Visual Studio 2019 Preview (16.1 Preview 1 at the time of writing). This is to check that if this has been found to be a bug, then it could have been fixed.
2) Create a completely new project. Without touching the project's executable path, try to create a sample that shows this behaviour. It doesn't need to be a full sample, just complete enough to show that Visual Studio fails to find fxc.exe.
3) If doing all of this shows that Visual Studio fails to find fxc.exe, then through Visual Studio 2019, report it as a bug.
But I will mention that a naïve test on my end shows that Visual Studio 2019 can compile HLSL shaders without any issues using the 18362, 17763 and 17134 SDKs. These were tested because these are the versions that I have installed.

Changing target to x64 breaks the FLTK build in Visual Studio 2017

I'm trying to build the FLTK version 1.3.4 which you can find from http://www.fltk.org/software.php in Visual Studio 2017.
I unzip everything, navigate to the ide/VisualC2010/ folder, and open the fltk.sln file in Visual Studio 2017.
Visual Studio asks if I would like to upgrade project targets to the latest Microsoft Visual Studio 2017 toolset. The upgrade options are Windows SDK Version: 10.0.16299.0 and Platform Toolset: Upgrade to v141. I press OK.
At this point if I do Build->Build Solution (Ctrl Shift B), everything works. However I noticed that the target is Win32 and I would like to also compile the library so I can link against x64 programs.
I go to Build->Configuration Manager and then in the Active Solution Platform->New... and Type or select new platform: x64 and Copy settings from: Win32 and Create new project platforms [checked] and then I press OK. This takes a while to complete.
Repeating step 3 no longer succeeds, with many projects failing with fatal error c1041: cannot open program database ...
I am pretty much a beginner at Visual Studio and I don't really understand what I'm doing. Can someone clue me in on what is happening here?
Fixed it by going to Tools -> Options and then Build and Run and then I changed maximum number of parallel project builds from 4 to 1.

MSBuild configuration error WDK 8.1 Visual Studio 2015 to build kernel mode driver

I'm struggling with VS 2015 C++ 'Platform Toolset' configuration property to build a test *.sys kernel driver I want play around this night.
So, this is a fresh new installation of VS 2015 Pro (update 1) plus WDK 8.1 (just downloaded) running on clean Win 8.1
All libs and headers like ntddk.h are in place.
But C++ Solution Explorer -> General -> Platform Toolset does not eat every option:
Visual Studio 2015 (v140) -- ok
Visual Studio 2015 - Windows XP (v140_xp) -- ok
WindowsApplicationForDrivers8.1 -- error
WindowsKernelModeDriver8.1 -- error (need this one)
WindowsUserModeDriver8.1 -- error
Nags as follows:
One or more values are invalid. MSBuild returned the following error:
The imported project "C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\v120\Microsoft.cpp.props" was not
found. (Directory exists though!) Confirm that the path in the
declaration is correct, and that the file exists on disk.
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Redirect.12.props
I don't know what it could be. Am I supposed to have WDK 10 towards to VS2015?!
Anyway, I need the ability to build the driver on VS 2015.
Could it be directed compiler scripts?
Any ideas?
Ok
Moving to WDK 10 helped!
https://msdn.microsoft.com/en-us/windows-drivers/develop/building_a_driver
Ensure that you have the same version of SDK and WDK installed on your
computer.
You need to install the driver update for visual studio if you are working on visual studio then you have to get the proper update for it. I've a link please follow this link and you will get rid off from this problem..enter link description here
enter link description here

Winres.h copilation error in CryEngine EaaS

I am new to Cryengine and I am trying to build custom Game DLL for my game.
But first, I tried to compile CryGameZero DLL and I came up with some compilation errors.
I am using VS2013 Professional.
Error RC1015: cannot open include file 'winres.h'.
c:\...\CRYENGINE\BinTemp\rc_files\CryGameZero.auto_gen.rc
10 1 CryGameZero
Error MSB3073: The command "cd /d
"c:\...\CRYENGINE" & cry_waf.exe
build_win_x86_profile --project-spec gamezero
--execsolution="c:\...\CRYENGINE\Solutions\CRYENGINE.sln"
--targets=CryGameZero" exited with code 1.
c:\...\CRYENGINE\_WAF_\msbuild\waf_build.targets
69 3 CryGameZero
I checked in my VC++ Directories and I had C:\Program Files (x86)\Windows Kits\8.0\include\um
but winres.h was not in that directory so I changed to C:\Program Files (x86)\Windows Kits\8.1\Include\um where is winres.h located but I still get the same error.
Does anybody had the same problem or know how to fix this. I was searching on Google but so far I found documentation and tutorials on doing this with older versions of Cryengine without WAF and using VS2010 or VS2012.
I found a solution for this problem.
Here is the solution step by step.
First check for WAF configuration.
cry_waf.exe configure --auto-detect-verbose True
--generate-vs-projects-automatically False
In my case, WAF was automaticaly detecting MSVC and Win SDK versions and fout
MSVC 11.0
MSVC 12.0
And automaticaly set it to MSVC 11.0 because that was first in the list.
The same goes with Win SDK versions, found
SDK 8.0
SDK 8.1
Amd automatically set to 8.0
Since I am using Visual Studio 2013, According to Crytek documentation you need to set versions of MSVC and Win SDK to suite your VS version
VS Version VC++ Version Recomended Win SDK
2012 11.0 8.0
2013 12.0 8.1
2015 14.0 10.0.10240.0
NOTE FOR VS2015: Early installations of Visual Studio 2015 may have installed 10.0.10150.0 instead. In this scenario, re-run the
Visual Studio installer and select the recommended version.
Set that to appropriate versions, clean solution and build again made all as good as it needs to be.

manifest is picking predifined redist

i am developing a software using Visual C++ 2008 Express Edition. after build in release mode, i have made a setup file with latest redist 2008. the software is running in my PC fine. in my PC this redist are installed :
in my friends PC, the same redist are installed. but the software is crashing on my friends PC.
from the event log it shows:
as you can see, it is demanding 9.0.21022.8 version of redist whether there is previously installed latest version of redist(9.0.30729.17). so, i go for a google. from the internet, i edit my C:\Program Files\Microsoft Visual Studio 9.0\VC\include\crtassem.h
but it didn't help. then i check my project manifest. and i saw :
but i don't know how to edit manifest (i am new in VC++). and i also check C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest. i shows:
i have tried to find out 9.0.21022.8 version of redist in the internet. but i have failed. from my VCExpress installer there is a file named vcredistmin_x86.exe :
as you can see the version of the file is 9.0.21022.8. i think this is the redist i need. but i cannot install it. it says "run the setup.exe file"
what can i do?
Edit(if i am asking two different answer from this question, please inform me. i will delete this edited part):
i am now wanting to deploy my project from Microsoft Visual studio 2008. i have uninstalled previous Microsoft Visual C++ 2008 express edition. but when i am trying to install Microsoft Visual studio 2008, it says
Installation Requirements:
A compatible version of Visual Studio 2008 was not detected on the
system. This update is designed for only the Microsoft Visual Studio
2008 (ENU) product family, and is not compatible with any Express
editions.
guys, have you any idea what to do?
From what I see this download is 9.0.21022.8: http://www.microsoft.com/en-us/download/details.aspx?id=29
I don't know about VS Express, in VS full version there are the vcredist_x86/x64/arm.exe available in the install directory (For VS2012: .../Microsoft Visual Studio 11.0\VC\redist\1033)
If it's acceptable for you, the simplest way to forget about this problems you can statically link with Runtime by changing your project properties: C/C++ -> Code Generation -> Runtime Library, select /MT or /MTd. Runtime library will be included into your executable so you won't have to install it on client machine.