fix the link step on Windows
authorJP Cimalando <jpcima@users.noreply.github.com>
Thu, 9 Aug 2018 10:49:45 +0000 (12:49 +0200)
committerJP Cimalando <jpcima@users.noreply.github.com>
Thu, 9 Aug 2018 10:49:45 +0000 (12:49 +0200)
RtAudio.h
rtaudio_c.h

index 976ada06133fb0a470bca0c29553263034460709..5b71fe88301218179bbe734a55e52cf790dc8dbb 100644 (file)
--- a/RtAudio.h
+++ b/RtAudio.h
 #define RTAUDIO_VERSION "5.0.0"
 
 #if defined _WIN32 || defined __CYGWIN__
-  #define RTAUDIO_DLL_PUBLIC
+  #if defined(RTAUDIO_EXPORT)
+    #define RTAUDIO_DLL_PUBLIC __declspec(dllexport)
+  #else
+    #define RTAUDIO_DLL_PUBLIC
+  #endif
 #else
   #if __GNUC__ >= 4
     #define RTAUDIO_DLL_PUBLIC __attribute__( (visibility( "default" )) )
index 550f480453cc08997e994dca1c3f5bf713d61592..e4cdf82a55947d782d7e42c3946f6692d7837e13 100644 (file)
@@ -2,7 +2,7 @@
 #define RTAUDIO_C_H
 
 #if defined(RTAUDIO_EXPORT)
-#ifdef WIN32
+#if defined _WIN32 || defined __CYGWIN__
 #define RTAUDIOAPI __declspec(dllexport)
 #else
 #define RTAUDIOAPI __attribute__((visibility("default")))