Skip to content

Commit 93b7dbb

Browse files
committed
windows: Don't mark the API as dllexport if statically linking MojoAL.
Fixes #21.
1 parent 9392f21 commit 93b7dbb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

mojoal.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
#include <math.h>
1212
#include <float.h>
1313

14-
#ifdef _WIN32
14+
/* Unless compiling statically into another app, we want the public API
15+
to export on Windows. Define these before including al.h, so we override
16+
its attempt to mark these as `dllimport`. */
17+
#if defined(_WIN32) && !defined(AL_LIBTYPE_STATIC)
1518
#define AL_API __declspec(dllexport)
1619
#define ALC_API __declspec(dllexport)
1720
#endif

0 commit comments

Comments
 (0)