Merge pull request #114626 from Repiteo/libgodot/macro-fix
GDExtension: Ensure `LIBGODOT_API` is always defined
This commit is contained in:
@@ -34,14 +34,16 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif // __cplusplus
|
||||
|
||||
// Export macros for DLL visibility
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#define LIBGODOT_API __declspec(dllexport)
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define LIBGODOT_API __attribute__((visibility("default")))
|
||||
#endif // if defined(_MSC_VER)
|
||||
#else
|
||||
#define LIBGODOT_API
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name libgodot_create_godot_instance
|
||||
@@ -70,4 +72,4 @@ LIBGODOT_API void libgodot_destroy_godot_instance(GDExtensionObjectPtr p_godot_i
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user