Browse Source

Define LOVE_EXPORT on non-Windows.

With GCC or Clang, LOVE_EXPORT is defined as __attribute__((visibility("default"))).
Miku AuahDark 2 years ago
parent
commit
c342339fee
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/common/config.h

+ 3 - 1
src/common/config.h

@@ -104,8 +104,10 @@
 #endif
 #endif
 
 
 // DLL-stuff.
 // DLL-stuff.
-#ifdef LOVE_WINDOWS
+#if defined(_MSC_VER)
 #	define LOVE_EXPORT __declspec(dllexport)
 #	define LOVE_EXPORT __declspec(dllexport)
+#elif defined(__GNUC__) || defined(__clang__)
+#	define LOVE_EXPORT __attribute__((visibility("default")))
 #else
 #else
 #	define LOVE_EXPORT
 #	define LOVE_EXPORT
 #endif
 #endif