Browse Source

Fix visibility for GCC

O01eg 4 năm trước cách đây
mục cha
commit
1393ededfd
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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