Enable dllexport for Lua API

This allows external libraries to load the Lua API from our executable
even if it is linked statically. This is useful for a Lua debugger which
needs to interact with the Lua API.
This commit is contained in:
asarium committed 2020-08-08 18:00:52 +02:00
1 parent fb4b71c935
commit 646a5d60f8
1 file changed
+12
+12
View File
@@ -161,10 +161,22 @@
#else
#ifdef WIN32
// Export even when building statically to allow external libraries to load the Lua API symbols
#if defined(LUA_CORE) || defined(LUA_LIB)
#define LUA_API __declspec(dllexport)
#else
#define LUA_API extern
#endif
#else
#define LUA_API extern
#endif
#endif
/* more often than not the libs go together with the core */
#define LUALIB_API LUA_API