Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Trying to build a header file in CMake for Visual Studios 2017, keep g


  • Please log in to reply

#1
ThatOneDude

ThatOneDude

    Member

  • Member
  • PipPip
  • 37 posts

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.

Attached Files


  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP