This is a small example using modio.io's SDK C interface to create a GDNative script that just showcases some very simple bare bones calls
Dependencies:
- You need Godot headers
- clang or any decent C compiler that's C11 or C99 compatible
To compile the library on Linux, do
clang -std=c11 -fPIC -c -I./godot_headers src/modio_wrapper.c -o src/modio_wrapper.os
clang -shared src/modio_wrapper.os -L. -lmodio -o ./bin/libmodio_wrapper.so
This creates the file libmodio_wrapper.so
in your bin/
directory.
Todo: Test Mac Os compilation.
Todo: Test Windows compilation.
Create a new object using preload("res://bin/modio_wrapper.gdns").new()