Ver Fonte

Fix visibility for GCC

(cherry picked from commit 1393ededfdaec154d2ce27c9b19fa3fae9538bfc)
O01eg há 4 anos atrás
pai
commit
18eca32761
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      modules/gdnative/include/gdnative/gdnative.h

+ 3 - 1
modules/gdnative/include/gdnative/gdnative.h

@@ -53,7 +53,9 @@ extern "C" {
 #endif
 
 // This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
-#ifdef _WIN32
+#ifdef __GNUC__
+#define GDN_EXPORT __attribute__((visibility("default")))
+#elif defined(_WIN32)
 #define GDN_EXPORT __declspec(dllexport)
 #else
 #define GDN_EXPORT