From 8f157f120a8c11799094a5f294d465a3afd2472f Mon Sep 17 00:00:00 2001 From: Ronald Caesar Date: Mon, 8 Jun 2026 23:53:36 -0400 Subject: [PATCH] engine: add export function attribute Adds the BAL_EXPORT definition which allows to export functions to Lua via FFI. Signed-off-by: Ronald Caesar --- include/bal_attributes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/bal_attributes.h b/include/bal_attributes.h index 14ac1d7e..ddce8236 100644 --- a/include/bal_attributes.h +++ b/include/bal_attributes.h @@ -82,6 +82,16 @@ extern "C" #endif +#if BAL_PLATFORM_WINDOWS + +#define BAL_EXPORT __declspec(dllexport) + +#else + +#define BAL_EXPORT __attribute__((visibility("default"))) + +#endif // BAL_EXPORT + #ifdef __cplusplus } #endif /* __cplusplus */