From 468b921096b326771fbc0974de44feb0d9d10513 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> Date: Thu, 18 Aug 2011 17:02:25 -0400 Subject: [PATCH] Using dllimport on Win32 when not building Opus --- src/opus.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/opus.h b/src/opus.h index 93d6c7c29..aa18dd060 100644 --- a/src/opus.h +++ b/src/opus.h @@ -35,11 +35,21 @@ extern "C" { #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)) -- GitLab