I've been working out how to build a GDExtension and going through the tutorial. I saw the include line:
#include <godot_cpp/classes/sprite2d.hpp>

I eventually figured out that it is possibly including from the .lib file generated by godot-cpp, as when I browse that file I see the expected class list:

but... I'm not sure of this. It doesn't have quite the expected file structure, and I'm not sure if the .obj files are what I should actually be looking at. It also doesn't help me at all if I'm looking for the exposed members of the classes I want to include, since the .obj files are binary.

godot-cpp has a more correct-looking file structure under \godot-cpp\include\godot_cpp\classes, but that directory only contains ref.hpp and wrapped.hpp.

So I'm at a bit of a loss. Where is the right place to look to see what header files I can include and what I can use from them?

Thanks a bunch!

  • After you build the "godot-cpp" project, the headers will be in "godot-cpp/gen/include".

    To build godot-cpp, you need to have the Godot build system 'scons' installed. Then, from the 'godot-cpp' root folder, do 'scons platform=<my_platform>'. e.g. for me, it's "scons platform=windows"

After you build the "godot-cpp" project, the headers will be in "godot-cpp/gen/include".

To build godot-cpp, you need to have the Godot build system 'scons' installed. Then, from the 'godot-cpp' root folder, do 'scons platform=<my_platform>'. e.g. for me, it's "scons platform=windows"

godot-cpp/gen/include

Ah thank you! That was the one piece of info I was struggling to find. I already had the demo built using Scons and running in Godot. I just didn't know where to find those headers to do my own work. The rest of your answer should hopefully be very useful for anyone who stumbles across this thread. Thanks!