From f315912d8568d47c52f739807768629714981fdf Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 18 Jun 2022 14:05:07 +0200 Subject: [Windows] Fix windows build with mingw. Forces ".dll" extension for library when building with mingw. Override GDN_EXPORT which is incorrectly defined in the upstream gdnative headers (3.x) and godot-cpp include (4.0) when building for windows with mingw. --- src/init_gdnative.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/init_gdnative.cpp') diff --git a/src/init_gdnative.cpp b/src/init_gdnative.cpp index 77669af..00109a4 100644 --- a/src/init_gdnative.cpp +++ b/src/init_gdnative.cpp @@ -34,6 +34,12 @@ #include #include +#ifdef _WIN32 +// See upstream godot GH-62173. +#undef GDN_EXPORT +#define GDN_EXPORT __declspec(dllexport) +#endif + /* Singleton */ static bool _singleton = false; static const godot_object *_singleton_lib = NULL; -- cgit v1.2.3