Build Error on Windows: "Filename or extension too long" when compiling Godot-CPP for Android

Godot Version

Replace this line with your Godot version
Godot 4.2.1

Question

Ask your question here! Try to give as many details as possible
When trying to compile the Godot-CPP bindings for Android using SCons on Windows, I encounter the following error:

scons: *** [godot-cpp\bin\libgodot-cpp.android.template_debug.arm64.a] Filename or extension too long

Windows 11

Android NDK r25b (installed via Android Studio)

SCons 4.6.0

Python 3.10

If I was correct, windows’ file system can only handle a path within 255 characters long. So your tremendous folder structure might cause an enormously long path. (reminds me of a meme of an OOP programmer with his extraordinary folder structure)

1 Like