[4.0] Unable to compile C++ with SCons, missing binding_generator
I've migrated my project recently from 3.5 to 4.0 and while trying to compile libraries I get the following error:
ModuleNotFoundError: No module named 'binding_generator':
File "/home/rayhammer/Documents/Godot/GunPower/SConstruct", line 7:
from binding_generator import scons_generate_bindings, scons_emit_files
I'm not sure what's wrong since I followed the guide, so any help would be appreciated
Try updating SCons or something. Mine is v4.4.0 and I have managed to build the GDExtensionExample.
I believe this is because the SConstruct file listed in the documentation here is incorrect. Instead of the one listed in the documentation, this one should be used: https://github.com/godotengine/godot-cpp-template/blob/main/SConstruct
The example SConstruct in the docs should work. I used it a couple months ago in a live GDExtension demo where it worked, and looking at the code now, it seems fine to me.
The one in godot-cpp-template is more advanced for sure, and that project is a great place to start, but it shouldn't be required.
Returning to the original problem:
I've migrated my project recently from 3.5 to 4.0 and while trying to compile libraries I get the following error:
This could be a matter of not pulling in the updated version of the godot-cpp Git submodule?
In any case, we'd really need to see more of your project to know for sure. Please share an MRP or more details!
Closing due to lack of response, if you provide the requested information this can be reopened