Error when compiling Godot 3.4.2 from source

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By thebuddyadrian

I’m getting an error in the terminal when trying to compile Godot 3.4.2 from source, it seems to be related to Windows 11. Is there any way to fix this?

scons: Reading SConscript files ...
Configuring for Windows: target=release_debug, bits=64
Using MinGW
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] Compiling ==> platform\windows\os_windows.cpp
[Initial build] Linking Static Library ==> main\
[Initial build] Compiling ==> main\tests\test_gui.cpp
[Initial build] Compiling ==> main\tests\test_main.cpp
[Initial build] Compiling ==> main\tests\test_math.cpp
Ranlib Library         ==> main\
[Initial build] Compiling ==> main\tests\test_oa_hash_map.cpp
[Initial build] Compiling ==> main\tests\test_ordered_hash_map.cpp
[Initial build] Compiling ==> main\tests\test_physics.cpp
[Initial build] Compiling ==> main\tests\test_physics_2d.cpp
[Initial build] Compiling ==> main\tests\test_render.cpp
[Initial build] Compiling ==> main\tests\test_shader_lang.cpp
[Initial build] Compiling ==> main\tests\test_string.cpp
b"platform\\windows\\os_windows.cpp: In member function 'bool OS_Windows::_is_win11_terminal() const':\nplatform\\windows\\os_windows.cpp:2236:21: error: 'ENABLE_VIRTUAL_TERMINAL_PROCESSING' was not declared in this scope\n   return ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING);\n                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nplatform\\windows\\os_windows.cpp:2236:21: note: suggested alternative: 'MM_SPECTRUM_SIGNAL_PROCESSING'\n   return ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING);\n
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n                     MM_SPECTRUM_SIGNAL_PROCESSING\n"
scons: *** [platform\windows\] Error 1
scons: building terminated because of errors.
[Time elapsed: 00:00:13.033]

I suggest to open a bug report at GitHub.

Xrayez | 2021-12-29 13:05