Dan K
Dan K

Reputation: 238

error MSB6006: "CL.exe" exited with code -1073741805

I am getting the following compile error when building a C++ application in VS 2010

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error MSB6006: "CL.exe" exited with code -1073741805.

I know it has something got to do with property settings, but I am not quite sure as to what i should do, Can someone tell me what i should do to remove this error?..Thanks in advance.

Upvotes: 2

Views: 5471

Answers (2)

Greg
Greg

Reputation: 1251

You may have had imported property sheets which were not compatible with your current build environment.

Try to open Property Manager and see if any custom property sheets are present.

I just experienced this issue moving from VS2010 to VS2013, where I had some old Windows 8.1 SDK property sheets. Building from the command line caused this error, while building within Visual Studio was fine.

Upvotes: 1

JDługosz
JDługosz

Reputation: 5652

I have a long experience with finding and reporting compiler bugs.

First, MSBuild leaves some files that includes the actual command line used to invoke CL.exe. It also sets environment variables, so you might need to look at /v:d output to see the actual steps to reproduce. Get CL.exe to produce the error without MSBuild.

Then prune things out of the source file until you get a small thing that still frys the compiler. I delete stuff starting at the bottom. I remove #include's that are no longer needed; expand out the bottom one that remains and continue.

Save each "save" so you can back out when you kill the error.

Then, log an incident with MS. Once they get it to the proper department, and then determine that it's a compiler bug, they will refund your incident. I recall having something like 3 credits with the MSDN subscription; used that to get it rolling.

Upvotes: 1

Related Questions