diff options
-rw-r--r-- | include/godot_cpp/core/defs.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/godot_cpp/core/defs.hpp b/include/godot_cpp/core/defs.hpp index 7243a61..b9e3716 100644 --- a/include/godot_cpp/core/defs.hpp +++ b/include/godot_cpp/core/defs.hpp @@ -34,13 +34,15 @@ #include <cstddef> #include <cstdint> -#ifdef __GNUC__ -#define GDN_EXPORT __attribute__((visibility("default"))) -#elif defined(_WIN32) +#if !defined(GDN_EXPORT) +#if defined(_WIN32) #define GDN_EXPORT __declspec(dllexport) +#elif defined(__GNUC__) +#define GDN_EXPORT __attribute__((visibility("default"))) #else #define GDN_EXPORT #endif +#endif // Turn argument to string constant: // https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html#Stringizing |