Receiving an ALL_Build Access Denied Error

When I was following the basic documentation of downloading GLFW, I downloaded the source 3.3.2 file, and followed the steps. Once I configured, and generated I opened the project to build the files, and on both Release and Debug I receive the same error. I am using x64, C++ in Visual Studio, no custom settings.
GLFW - Microsoft Visual Studio 2_1_2021 10_36_39 PM
I reinstalled my Visual Studio, CMake, GLFW, Glew. And reinstalled, probably 5 times already. I turned of my Anti Virus and same issue still occurred, I am running as administrator on my computer.
I am unsure what to do, and completely lost, help will be greatly appreciated.

Hi @alexking600 welcome to the GLFW forum!

The ALL_BUILD project is just for the cmake build process, and it can’t be ‘run’.

To run your project, you need to right click on it and “Set as Startup Project” in Visual Studio first, then when you run the code it will run that project.

You might be interested in using

This starter cmake project uses the VS_STARTUP_PROJECT cmake property available in cmake 3.6.0 and above to set the startup project to be the executable.



Hello @dougbinks, I am following this tutorial.
LearnOpenGL - Creating a window
Thank you also for responding, I am really happy that you are helping.

Yes when I run the project, this error is shown.
I followed your documentation steps also, and this happens in Visual Studio when I generated the files in Cmake.

This problem also isn’t due to permissions.


The error is because you are trying to run the project ALL_BUILD, which you cannot run.

You need to select a project in your Visual Studio solution which you CAN run, one which generates an executable. To do this right click on the project which creates the executable and select “Set as Startup Project”.

Alternatively try the GLFW-CMake-Starter I linked to above, making sure to use cmake version 3.6.0 or newer.



So do I need to create a separate project, link this project to it, and then run?
Sorry, I am new to all this stuff :grinning_face_with_smiling_eyes:

You need to right click on existing project in Solution Explorer panel. Here’s the screenshot showing example where to right-click:

Choose project you want to run, right click and select “Set as Startup project”. Do NOT choose ALL_BUILD.


this is what I have I don’t have a Cmake demo, do I have to make another project the one where I need to line the libraries to?

This is the cmake Visual Studio project you’ve created for the library, and potentially the examples and tests - which you can see if you double click to open up the GLFW folder.

If you read the tutorial you linked to you haven’t yet got to the point of creating Our first project, which is where you make the project and code for creating a window.

Alternatively, try the link I gave above for the GLFW-CMake-starter project which is a simpler initial project to start with.