Hello,
I am currently following a tutorial on how to create a graphics window in OpenGL in C++, and it involves downloading source code for some header files and building it using CMake. However, when I try to configure it, I get this result:
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft ® Build Engine version 15.7.180.61344 for .NET Framework
Copyright © Microsoft Corporation. All rights reserved.
Build started 7/20/2018 11:52:21 AM.
Project "C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\VCTargetsPath.tlog\".
InitializeBuildStatus:
Creating "Debug\VCTargetsPath.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
PostBuildEvent:
echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\
:VCEnd
This program is blocked by group policy. For more information, contact your system administrator.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\ [C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj" (default target) (1) ->
(PostBuildEvent target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "echo VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\ [C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\sonny\Documents\Header Files\glfw-3.2.1\glfw_build\CMakeFiles\3.12.0\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:08.27
Exit code: 1
Configuring incomplete, errors occurred!
See also "C:/Users/sonny/Documents/Header Files/glfw-3.2.1/glfw_build/CMakeFiles/CMakeOutput.log".
I am not sure how to fix this. I tried to figure out why it can't execute the MSBuild command, but so far nothing I've tried has worked.
Please note that I am still relatively inexperienced with C++, so if you know what it is I need to do please explain it to me. Thank you.
For reference, I will attach the CMakeLists.txt files.