I read the tutorial (http://www.opengl-tutorial.org/fr/beginners-tutorials/tutorial-1-opening-a-window/) and i'm trying to compile the project with cmake. I have the last version of cmake (3.14.3) My drivers are up to date I have the visual studio compiler
When i follow the tutorial, i do the same thing but my cmake don't let me compile. I have this following erros when i try to compile the src folder of the tutorial:
Make Error at CMakeLists.txt:3 (project): Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine, version 4.7.3190.0
[Microsoft .NET Framework, Version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.
La g‚n‚ration a d‚marr‚ 24/04/2019 22:51:20.
Projet "C:\Users\xxx\OneDrive\Bureau\openglproject\CMakeFiles\3.14.3\VCTargetsPath.vcxproj" sur le noud 1 (cibles par d‚faut).
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.DesignTime.targets(491,5): error MSB4062: Impossible de charger la tƒche "SetEnv" … partir de l'assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll. Impossible de charger le fichier ou l'assembly 'Microsoft.Build.Utilities.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses d‚pendances. Le fichier sp‚cifi‚ est introuvable. Assurez-vous que la d‚claration <UsingTask> est correcte, que l'assembly et toutes ses d‚pendances sont disponibles et que la tƒche contient une classe publique qui impl‚mente Microsoft.Build.Framework.ITask. [C:\Users\xxx\OneDrive\Bureau\openglproject\CMakeFiles\3.14.3\VCTargetsPath.vcxproj]
G‚n‚ration du projet "C:\Users\xxxx\OneDrive\Bureau\openglproject\CMakeFiles\3.14.3\VCTargetsPath.vcxproj" termin‚e (cibles par d‚faut) -- CHEC.
CHEC de la build.
So i check on google: and i follow this step from "C:\Microsoft.Cpp.Default.props" was not found.
1) set ms version to 2017: npm config set msvs_version 2017 set VCTargetsPath environment variable to C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets run command console as system administrator
2) Run npm install --global --production windows-build-tools Run npm install --save nan Set VCTargetsPath environment variable to C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
3) Run this on an elevated command prompt (admin): npm install --global --production windows-build-tools. If you don't have npm I recommend installing it, otherwise this won't work. Change ownership in the install dir (in my case C:\Program Files (x86)\MSBuild\14.0) to your user, instead of admin. (properties>Security>Advanced).
I have try the 3 possibilities but it don't works ....
Can someone help me ?