From 624897728be8bbd86b3c32f2044f91c4c889daab Mon Sep 17 00:00:00 2001 From: DiamondNether90 Date: Sat, 17 Jan 2026 21:23:44 +1100 Subject: [PATCH] Update [WIP] External Libraries --- %5BWIP%5D-External-Libraries.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/%5BWIP%5D-External-Libraries.md b/%5BWIP%5D-External-Libraries.md index 47f8861..c7880c2 100644 --- a/%5BWIP%5D-External-Libraries.md +++ b/%5BWIP%5D-External-Libraries.md @@ -63,7 +63,7 @@ GroundValue greetUser(GroundScope* scope, List args) { } void ground_init(GroundScope* scope) { - groundAddNativeFunction(scope, "Example.GreetUser", greetUser, STRING, 1, STRING, "username"); + groundAddNativeFunction(scope, "Example_GreetUser", greetUser, STRING, 1, STRING, "username"); } ``` Now all we need to do is compile with `gcc file.c -shared -o file.so -fPIC`. @@ -74,13 +74,13 @@ Once we have created the shared object file, we can import it as follows ```grnd extern "file" ``` -We can call our function with `call !Example.GreetUser $string &out` +We can call our function with `call !Example_GreetUser $string &out` Example: ```py extern "file" -call !Example.GreetUser "DiamondNether90" &out +call !Example_GreetUser "DiamondNether90" &out println $out # Prints "Hello, DiamondNether90!" ``` \ No newline at end of file