ref: 468b921096b326771fbc0974de44feb0d9d10513
parent: d7f6700f167d74fa8fc81a03048044b68c9c8d4f
author: Jean-Marc Valin <[email protected]>
date: Thu Aug 18 13:02:25 EDT 2011
Using dllimport on Win32 when not building Opus
--- a/src/opus.h
+++ b/src/opus.h
@@ -35,11 +35,21 @@
#endif
#if defined(__GNUC__) && defined(OPUS_BUILD)
-#define OPUS_EXPORT __attribute__ ((visibility ("default")))
+
+# define OPUS_EXPORT __attribute__ ((visibility ("default")))
+
#elif defined(WIN32)
-#define OPUS_EXPORT __declspec(dllexport)
+
+# ifdef OPUS_BUILD
+# define OPUS_EXPORT __declspec(dllexport)
+# else
+# define OPUS_EXPORT __declspec(dllimport)
+# endif
+
#else
-#define OPUS_EXPORT
+
+# define OPUS_EXPORT
+
#endif
#define __check_int(x) (((void)((x) == (int)0)), (int)(x))