GDExtension: Ensure LIBGODOT_API always defined

This commit is contained in:
Thaddeus Crews
2026-01-05 12:34:35 -06:00
parent 5b4cbd2299
commit a5c42f1ddf

View File

@@ -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