godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.69k stars 528 forks source link

[TextServer, GDExtension] Fix building text servers as GDExtension, expose new/changed low-level methods to GDExtension API. #1479

Closed bruvzg closed 3 months ago

bruvzg commented 3 months ago

Part of https://github.com/godotengine/godot/pull/92715

dsnopek commented 3 months ago

@bruvzg Now that the Godot PR is merged, could you please rebase this and take it out of draft? It also needs the updates to the gdextension_interface.h that were made later (adding @deprecated). Thanks!

aaronfranke commented 3 months ago

When I compile on the latest Godot master and the latest godot-cpp master on macOS, I get this error:

Compiling addons/secondext/src/godot-cpp/src/classes/low_level.cpp ...
addons/secondext/src/godot-cpp/src/classes/low_level.cpp:59:17: error: out-of-line definition of 'ptrw' does not match any declaration in 'godot::Image'
uint8_t *Image::ptrw() {
                ^~~~
addons/secondext/src/godot-cpp/src/classes/low_level.cpp:63:23: error: out-of-line definition of 'ptr' does not match any declaration in 'godot::Image'
const uint8_t *Image::ptr() {
                      ^~~
2 errors generated.
scons: *** [addons/secondext/src/godot-cpp/src/classes/low_level.macos.template_debug.universal.o] Error 1
dsnopek commented 3 months ago

Does the generated image.hpp have the ptr() and ptrw() methods? It's sounds like maybe it didn't get re-generated after the update?

aaronfranke commented 3 months ago

@dsnopek Apologies, it was a case of a bad cache / lack of regeneration. I tried nuking the generated files and compiling again and it worked.