Open Flarkk opened 3 years ago
Further investigations : I've generated a fresh new api.json from the official stable 3.4 Godot binary. Now the python error has gone. I think the default .json provided along with the godot-cpp 3.4 branch is broken.
But now, I get a bunch of compilation errors related to #include <gdnative/basis.h>
directive, which raises fatal error: 'gdnative/basis.h' file not found
.
I've no gdnative
directory anywhere in godot-cpp nor godot-headers codebases, so I wonder what I'm missing here.
Any clue ?
Allright, so gdnative
directory seems to come from godot source, gdnative module.
I'm wondering if such a dependency is intentional ? It seems weird at first sight as it prevents from building godot-cpp without having the full godot source.
What do you think ?
Final comment, hopefully :
I realize that gdnative
is actually provided by godot-headers, but I’ve not pulled the right branch when updating godot-cpp.
I’ll have a try tomorrow and hopefully reduce this issue to the only remaining (minor) problem which is : default api.json is broken
Just to rule this out, make sure you are on the right branches and that you pull the submodules. If you've clone godot-cpp from master you're building Godot 4.0 extensions, not Godot 3.x gdnative modules.
Allright, everything has compiled after having set the correct branches both for godot-cpp and godot-headers. I'm now renaming this issue so that it focuses on the default json file.
Hi there, I've just switched to 3.4 and wanted to update my godot-cpp build. I'm running
scons SConstruct platform=linux generate_bindings=yes use_custom_api_file=yes custom_api_file=godot-headers/extension_api.json bits=64 use_llvm=yes -j8
, withextension_api.json
being the default json provided along with the 3.4 branch.I get the following python error :
Here is the code pointed out by the error (iterating a dictionary indeed gives the key, which is a string, so not supposed to be accessed by index, am I wrong ?): https://github.com/godotengine/godot-cpp/blob/68ce78179f90be9bec8cc88106dba0c244bdc4f6/binding_generator.py#L67-L69
Is it reproduced by you guys ? Any idea to workaround is welcomed ! Alternatively please tell me if I've missed something !