0

When I install catch2 I have this error:

Command I used:

git clone https://github.com/catchorg/Catch2.git
cd Catch2
cmake -Bbuild -H. -DBUILD_TESTING=OFF
cmake --build build/ --target install

Then when I use cmake --build build/ --target install, I got this message:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: The command "setlocal [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [C:\Users\Admin\Ca tch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmEnd [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\Admin\Catch2\build\install.vcxp roj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmErrorLevel [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: exit /b %1 [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :cmDone [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\Admin\Catch2\build\install.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(155,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\Admin\Catch2\build\install.vcxproj]

I don't know that message is good or bad. And if it's bad then how to solve the problem?

273K
  • 29,503
  • 10
  • 41
  • 64
  • 1
    Are the error lines truncated? At the very top it complains about `setlocal` but doesn't say what the problem actually is. – Stephen Newell Sep 01 '21 at 04:12
  • 1
    Are you running the cmake commands in "Developer command prompt[...]" or "Developer Powershell [...]"? Can you either capture the build output or `Out-File` (for powershell) the output of the build and install step so we can see the error. – AhiyaHiya Sep 01 '21 at 04:28
  • Also, before asking another question about that error, read the existing ones: https://stackoverflow.com/search?q=MSB3073. Searching here or, for VS error code, on MSDN should be the first step in fixing the thing yourself. As a new user here, please also take the [tour] and read [ask]. – Ulrich Eckhardt Sep 01 '21 at 06:21

0 Answers0