From e4f6d2bcee16de158fd4c06017219431f4ce3eca Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Mon, 28 Oct 2024 10:06:13 +0800 Subject: [PATCH] Updated auto-concatenation for dynamic library file extension for Apple platform. --- src/zhivo/ast/expression/VariableDeclarationExpression.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zhivo/ast/expression/VariableDeclarationExpression.cpp b/src/zhivo/ast/expression/VariableDeclarationExpression.cpp index 105b16b..71eb3b7 100644 --- a/src/zhivo/ast/expression/VariableDeclarationExpression.cpp +++ b/src/zhivo/ast/expression/VariableDeclarationExpression.cpp @@ -80,7 +80,12 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction( #endif } else { - #if defined(__unix__) || defined(__linux__) || defined(__APPLE__) + #if defined(__APPLE__) + + library += ".dylib" + handle = dlopen(library.c_str(), RTLD_LAZY); + + #elif defined(__unix__) || defined(__linux__) library += ".so"; handle = dlopen(library.c_str(), RTLD_LAZY);