mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
3458651010
commit
88120d4759
|
@ -27,10 +27,10 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/* New symbols must still be added to libmpv/mpv.def. */
|
/* New symbols must still be added to libmpv/mpv.def. */
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#ifdef _WIN32
|
||||||
#define MPV_EXPORT __attribute__((visibility("default")))
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define MPV_EXPORT __declspec(dllexport)
|
#define MPV_EXPORT __declspec(dllexport)
|
||||||
|
#elif defined(__GNUC__) || defined(__clang__)
|
||||||
|
#define MPV_EXPORT __attribute__((visibility("default")))
|
||||||
#else
|
#else
|
||||||
#define MPV_EXPORT
|
#define MPV_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue