Skip to content

Commit 02bce28

Browse files
committed
Update GDExtension tutorial for entry functions
Docs part of godotengine/godot-cpp#1095 Same changes as godotengine/godot-cpp#1115
1 parent 03081e0 commit 02bce28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tutorials/scripting/gdextension/gdextension_cpp_example.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ GDExtension plugin.
268268

269269
extern "C" {
270270
// Initialization.
271-
GDExtensionBool GDE_EXPORT example_library_init(const GDExtensionInterface *p_interface, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
272-
godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization);
271+
GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
272+
godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
273273
274274
init_obj.register_initializer(initialize_example_module);
275275
init_obj.register_terminator(uninitialize_example_module);
@@ -348,6 +348,7 @@ loaded for each platform and the entry function for the module. It is called ``g
348348
[configuration]
349349
350350
entry_symbol = "example_library_init"
351+
compatibility_minimum = 4.1
351352
352353
[libraries]
353354
@@ -369,6 +370,8 @@ loaded for each platform and the entry function for the module. It is called ``g
369370
android.release.arm64 = "res://bin/libgdexample.android.template_release.arm64.so"
370371
371372
This file contains a ``configuration`` section that controls the entry function of the module.
373+
You are also able to set a minimum compatible version with ``compatability_minimum`` of Godot
374+
which prevents older version of Godot to load your extension.
372375

373376
The ``libraries`` section is the important bit: it tells Godot the location of the
374377
dynamic library in the project's filesystem for each supported platform. It will

0 commit comments

Comments
 (0)