From eb7d20d0d2c750fada2f4719c20df0145f3d3fd7 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 4 Jan 2020 15:09:09 +0200 Subject: [PATCH] - fixed compilation on macOS and Linux --- include/zmusic.h | 1 + source/zmusic/zmusic_internal.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/zmusic.h b/include/zmusic.h index 592d62d..6f8ba4d 100644 --- a/include/zmusic.h +++ b/include/zmusic.h @@ -2,6 +2,7 @@ #include #include +#include // These constants must match the corresponding values of the Windows headers // to avoid readjustment in the native Windows device's playback functions diff --git a/source/zmusic/zmusic_internal.h b/source/zmusic/zmusic_internal.h index 7be53a4..81c5600 100644 --- a/source/zmusic/zmusic_internal.h +++ b/source/zmusic/zmusic_internal.h @@ -1,8 +1,14 @@ #pragma once #define ZMUSIC_INTERNAL +#ifdef _MSC_VER #define DLL_EXPORT __declspec(dllexport) #define DLL_IMPORT __declspec(dllexport) // without this the compiler complains. +#else // !_MSC_VER +#define DLL_EXPORT +#define DLL_IMPORT +#endif // _MSC_VER + typedef class MIDISource *ZMusic_MidiSource; typedef class MusInfo *ZMusic_MusicStream;