From 4a5e2b0350949b51fe26d8b529d328977b8c28e2 Mon Sep 17 00:00:00 2001 From: Marrub Date: Sat, 6 Jun 2015 11:05:13 -0400 Subject: [PATCH] added some more definitions for LT_EXPORT --- src/lt.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lt.h b/src/lt.h index fe5f165..0ea4a97 100644 --- a/src/lt.h +++ b/src/lt.h @@ -40,8 +40,15 @@ THE SOFTWARE. #define TOKEN_STR_BLOCK_LENGTH 512 // [marrub] When using in FFI, remove this from the declarations. -// Also make sure to redefine this for cross-platform. -#define LT_EXPORT __declspec(dllexport) +// Also make sure to redefine this if your platform is not supported. +// (OSX shouldn't need this at all) +#if defined(_MSC_VER) + #define LT_EXPORT __declspec(dllexport) +#elseif defined(_GCC) + #define LT_EXPORT __attribute__((visibility("default"))) +#else + #define LT_EXPORT +#endif enum {