From 1429cd8636bc3c5a023bbd0f84ae5cabd9620fb9 Mon Sep 17 00:00:00 2001 From: Chance Snow Date: Thu, 28 Sep 2023 12:51:12 -0500 Subject: [PATCH] Fix undefined `glfwGetWin32Window` --- examples/triangle/source/app.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/triangle/source/app.d b/examples/triangle/source/app.d index 127049e..35d9d6e 100644 --- a/examples/triangle/source/app.d +++ b/examples/triangle/source/app.d @@ -307,6 +307,12 @@ auto bindDelegate(Func, string file = __FILE__, size_t line = __LINE__)(Func f) return &func; } +version (Windows) { + import core.sys.windows.windows : GetModuleHandleA, HWND; + // FIXME: What's wrong with https://github.com/BindBC/bindbc-glfw/blob/6529ce4f67f69839a93de5e0bbe1150fab30d633/source/bindbc/glfw/bindstatic.d#L172 + extern(C) @nogc nothrow HWND glfwGetWin32Window(GLFWwindow* window); +} + // mac OS interop with the Objective-C Runtime version (OSX) { import core.attribute : selector;