PreLinkEvent失败,Release配置中出现错误MSB3073



仅在发布配置中看到此失败。我看到很多人都问过类似的问题,但在他们的情况下,这个问题在Postbuild期间出现,而且在几乎所有情况下,错误都更有意义。

PreLinkEvent:
Auto build dll exports
setlocal
cd C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.win
if %errorlevel% neq 0 goto :cmEnd
C:
if %errorlevel% neq 0 goto :cmEnd
C:cmake-3.17.0-win64-x64bincmake.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 Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: The command "setlocal [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: cd C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.win [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: C: [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: C:cmake-3.17.0-win64-x64bincmake.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:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: :cmEnd [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: :cmErrorLevel [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: exit /b %1 [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: :cmDone [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(148,5): error MSB3073: :VCEnd" exited with code -1073741819. [C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj]
Done Building Project "C:myfolderexampleswindowscalculatorwindows_Release_aarch64.cmake.wincalculator.vcxproj" (default targets) -- FAILED.

我比较了Debug和Release中的PreLinkEvent行,除了文件夹名称之外,它们完全相同。任何线索都将不胜感激。

删除/GL编译器标志后,问题得到了解决。我添加它只是为了发布配置,因此在调试配置中没有看到这个问题。

相关内容

  • 没有找到相关文章

最新更新