Registry / other / godot-cpp

godot-cpp

JSON →
library4.2.1vcpkgunverified

C++ bindings for the Godot script API

vcpkg install godot-cpp
INSTALL
IMPORT
SIG · GODOT-CPP
G
godot-cpp
othercppv4.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

godot_cpp/godot.hpp
#include <godot_cpp/godot.hpp>

Define a custom Godot node class and register it as a GDExtension.

#include <godot_cpp/godot.hpp> #include <godot_cpp/classes/node.hpp> using namespace godot; class MyNode : public Node { GDCLASS(MyNode, Node); protected: static void _bind_methods() {} public: void _ready() override { Godot::print("Hello from C++!"); } }; void initialize_gdextension_types(ModuleInitializationLevel p_level) { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { ClassDB::register_class<MyNode>(); } } extern "C" { GDExtensionBool GDE_EXPORT godot_gdextension_init(GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); init_obj.register_initializer(initialize_gdextension_types); init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE); return init_obj.init(); } }
Debug
Known issues
breakingGodot-cpp bindings are version-specific; mismatched versions can cause crashes.
fix
Ensure the godot-cpp version matches your Godot engine version exactly.
affects: all
Upgrade
Version history
4.2.1latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

godot-cpp — pip install godot-cpp · libregistry