0

I am building a C++ project with configuration Release|x64 via MsBuild using the command:

set MSBUILD_EXE_PATH="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
%MSBUILD_EXE_PATH% /t:Build /p:Configuration=Release /p:Platform=x64 "!SOURCES_DIR!\mySolution.sln"  

and I am getting the error:

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

What does it mean and how can I fix it?
Thank you

Davis8988
  • 636
  • 3
  • 7
  • 23
  • Do you have your environment setup correctly for C++, did you call vsdevcmd.bat first? (see https://stackoverflow.com/questions/53041391/how-to-build-c-c-c-solutions-using-msbuild-and-vs2017-compiler-via-batch-f for example for VS2017 but same principle applies for other versions) – stijn Nov 04 '18 at 09:31
  • I tried you suggestion. I added a call to the script: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" and also tried to run it with a parameter x64, but it didn't help and I am still getting the same error – Davis8988 Nov 04 '18 at 14:41

0 Answers0