瀏覽代碼

Fix visibility for GCC

(cherry picked from commit 1393ededfdaec154d2ce27c9b19fa3fae9538bfc)
O01eg 4 年之前
父節點
當前提交
18eca32761
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      modules/gdnative/include/gdnative/gdnative.h

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

@@ -53,7 +53,9 @@ extern "C" {
 #endif
 #endif
 
 
 // This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
 // 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)
 #define GDN_EXPORT __declspec(dllexport)
 #else
 #else
 #define GDN_EXPORT
 #define GDN_EXPORT