SCons compile error access denied

Godot Version

4.4-stable

Question

When trying to compile godot with SCons I get an Access denied error. I have not been able to get it to compile once so far. Does anyone know what I am doing wrong?


Side Note: I have been able to compile a simple hello world c++ file with SCons.


My terminal environment is command prompt running as administrator. Also, I am using python version: 3.13.2, Visual Studio 2022, MSCV v143, Scons version: v4.9.1.39a12f34d532ab2493e78a7b73aeab2250852790


Here is the output with the error:

C:\Projects\godot>scons platform=windows
scons: Reading SConscript files ...
Auto-detected 16 CPU cores available for build parallelism. Using 15 cores by default. You can override it with the `-j` or `num_jobs` arguments.
Using SCons-detected MSVC version 14.3, arch x86_64
Building for platform "windows", architecture "x86_64", target "editor".
Access is denied.
Checking for C header file mntent.h... no
scons: done reading SConscript files.
scons: Building targets ...
Compiling platform\windows\console_wrapper_windows.cpp ...
Access is denied.
Generating core\version_generated.gen.h ...
Generating core\disabled_classes.gen.h ...
scons: *** [platform\windows\console_wrapper_windows.windows.editor.x86_64.obj] Error 1
scons: building terminated because of errors.
INFO: Time elapsed: 00:00:00.21

Sounds like it could be a permissions issue on your folder.

So, I believe this should mean that I have full permission on the folder right? Because I am still getting the same error. I am confused though because I do believe that you are right in that it has something to do with permission issues.

Also I have it checked for full control on all the groups/usernames.

You are highlighting an administrator account which typically have higher privileges then a regular user.

I would look at the general USERS or Authenticated users group permissions.

The alternative is to run your terminal in administrator mode, but i dont recommend it and should not be required.

So this shows that I should have write access to the folder. So I’m still not sure why it would still give me access denied. Also I noticed that the files it mentions version_generated.gen.h and disabled_classes.gen.h are being created as I can see them in my folder. Also, they do get removed when running scons --clean.

Okay it looks like its failing when invoking the c++ compiler.

Maybe there is an issue accessing the compiler.

Thank you for the help I was able to compile the project successfully using MiniGW. However, still no success at being able to compile with visual studio.