From 88120d47599da61e17350da4d35b565d5c3e29aa Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 10 May 2022 10:02:38 -0500 Subject: client API: always export symbols on windows Windows is weird and symbols weren't actually being exported. This is because __GNUC__ is defined and picked up in the conditional, but __attribute__((visibility("default"))) doesn't actually export anything to the dll. Instead, just check if we have win32 defined first and then always set __declspec(dllexport). Fixes #10171. --- libmpv/client.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmpv') diff --git a/libmpv/client.h b/libmpv/client.h index 85d302a76a..07ab7d44bc 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -27,10 +27,10 @@ #include /* New symbols must still be added to libmpv/mpv.def. */ -#if defined(__GNUC__) || defined(__clang__) -#define MPV_EXPORT __attribute__((visibility("default"))) -#elif defined(_MSC_VER) +#ifdef _WIN32 #define MPV_EXPORT __declspec(dllexport) +#elif defined(__GNUC__) || defined(__clang__) +#define MPV_EXPORT __attribute__((visibility("default"))) #else #define MPV_EXPORT #endif -- cgit v1.2.3