godot: Unable to compile on windows with MinGW from scoop

Godot version: https://github.com/godotengine/godot/commit/bcbd480c32f7c9a6fdaad297ef1fbb8fa5fa12ee

OS/device including version: Windows 10

Issue description: I cloned the project in C:/godot I installed scoop and ran scoop install gcc python scons yasm make in my powershell then I cd c:/godot in the folder and run scons platform=windows verbose=yes use_mingw=yes arch=x64 I receive the following error:

PS C:\godot> scons platform=windows verbose=yes use_mingw=yes arch=x64
scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=default
Using MinGW
Checking for C header file mntent.h... no
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] g++ -o platform\windows\godot_windows.windows.tools.x64.o -c -std=gnu++17 -g3 -mwindows -Wall -Wshadow-local -Wno-misleading-indentation -Werror=return-type -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -DDEBUG_ENABLED -DWINDOWS_SUBSYSTEM_CONSOLE -DWINDOWS_ENABLED -DWASAPI_ENABLED -DWINMIDI_ENABLED -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DVULKAN_ENABLED -DMINGW_ENABLED -DMINGW_HAS_SECURE_API=1 -DTOOLS_ENABLED -DMINIZIP_ENABLED -DZSTD_STATIC_LINKING_ONLY -Ithirdparty\freetype\include -Ithirdparty\libpng -Ithirdparty\vulkan -Ithirdparty\vulkan\include -Ithirdparty\vulkan\loader -Ithirdparty\zstd -Ithirdparty\zlib -Iplatform\windows -I. platform\windows\godot_windows.cpp
=====
b''
=====
scons: *** [platform\windows\godot_windows.windows.tools.x64.o] Error 1
scons: building terminated because of errors.

I tried looking up information but I couldn’t find anything. The error seems to be related to a char in godot_windows.cpp

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@Calinou I managed to compile successfully thanks to your workaround @Xrayez thank you for the info! The use_llvm=yes was missing. The problem with the scoop b'' remains, though.

As a workaround, you can install llvm-mingw, add its bin folders to your user’s PATH environment variable, open a new command prompt (or reboot if you added it to your system PATH), and compile with scons use_mingw=yes use_llvm=yes use_lld=yes.

I think there are 2 folders to add in your PATH with llvm-mingw, but I can’t check right now.