question

MaitreyiGupta-6968 avatar image
0 Votes"
MaitreyiGupta-6968 asked MaitreyiGupta-6968 answered

MSB3073: :VCEnd" exited with code -1073741819

I am seeing this failure with release and relwithdebinfo config. There are no compilation failures for debug configuration.

 PreLinkEvent:
   Auto build dll exports
   setlocal
   cd C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win
   if %errorlevel% neq 0 goto :cmEnd
   C:
   if %errorlevel% neq 0 goto :cmEnd
   C:\cmake-3.17.0-win64-x64\bin\cmake.exe -E __create_def C:/myfolder/examples/windows/calculator/windows_Release_aarch64.cmake.win/calculator.dir/Release/exports.def C:/myfolder/examples/windows/calculator/windows_Release_aarch64.cmake.win/calculator.dir/Release//objects.txt
   if %errorlevel% neq 0 goto :cmEnd
   :cmEnd
   endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
   :cmErrorLevel
   exit /b %1
   :cmDone
   if %errorlevel% neq 0 goto :VCEnd
   :VCEnd
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: The command "setlocal [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: cd C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: C: [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: C:\cmake-3.17.0-win64-x64\bin\cmake.exe -E __create_def C:/myfolder/examples/windows/calculator/windows_Release_aarch64.cmake.win/calculator.dir/Release/exports.def C:/myfolder/examples/windows/calculator/windows_Release_aarch64.cmake.win/calculator.dir/Release//objects.txt [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmEnd [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmErrorLevel [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: exit /b %1 [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmDone [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :VCEnd" exited with code -1073741819. [C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj]
 Done Building Project "C:\myfolder\examples\windows\calculator\windows_Release_aarch64.cmake.win\calculator.vcxproj" (default targets) -- FAILED.

I compared the PreLinkEvent lines in Debug and Release and they are exactly same except for the folder name. Any leads are appreciated.



c++vs-msbuild
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MaitreyiGupta-6968 , for your issue, could you run your command in cmd.exe to get more error messages? You can create a .txt file in Notepad and copy your script in the text file to create a batch file. Then, run the .bat file as administrator to check it.

1 Vote 1 ·

Hi @AnnaXiu-MSFT, I am running the following command in cmdline:

 C:\cmake-3.17.0-win64-x64\bin\cmake.exe --build C:\myfolder\examples\windows\calculator/windows_ReleaseG_aarch64.cmake.win --target calculator --config RelWithDebInfo


The logs pasted above are the error logs from this command. I can share the complete logs also if that is helpful. I also found that the issue is seen only when linking for DLLs and not for static libraries or executables.

Is there a way to make sense out of the error code "-1073741819" returned above?

0 Votes 0 ·

1 Answer

MaitreyiGupta-6968 avatar image
1 Vote"
MaitreyiGupta-6968 answered

The issue got resolved after removing /GL compiler flag. I added it only for release configuration, hence the issue was not seen for debug configuration.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.