summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct4
-rw-r--r--src/init_gdextension.cpp6
-rw-r--r--src/init_gdnative.cpp6
3 files changed, 16 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 56bb711..e79913e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -67,6 +67,10 @@ else:
})
env = env.Clone()
+# Patch mingw SHLIBSUFFIX.
+if env["platform"] == "windows" and env["use_mingw"]:
+ env["SHLIBSUFFIX"] = ".dll"
+
opts.Update(env)
target = env["target"]
diff --git a/src/init_gdextension.cpp b/src/init_gdextension.cpp
index c923881..b252379 100644
--- a/src/init_gdextension.cpp
+++ b/src/init_gdextension.cpp
@@ -37,6 +37,12 @@
#include "WebRTCLibDataChannel.hpp"
#include "WebRTCLibPeerConnection.hpp"
+#ifdef _WIN32
+// See upstream godot-cpp GH-771.
+#undef GDN_EXPORT
+#define GDN_EXPORT __declspec(dllexport)
+#endif
+
using namespace godot;
using namespace godot_webrtc;
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 <gdnative_api_struct.gen.h>
#include <net/godot_net.h>
+#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;