From ded25c931fa876fe292a0cfe3f072cce154c5029 Mon Sep 17 00:00:00 2001 From: hakan Date: Sun, 17 Dec 2023 23:27:26 +0100 Subject: [PATCH] fix linker issue on linux force linker to include compress_for_stb_image_write original solution by gecko0307 --- source/stb/package.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/stb/package.d b/source/stb/package.d index 821480f..95765f9 100644 --- a/source/stb/package.d +++ b/source/stb/package.d @@ -12,3 +12,9 @@ int binarySearch(int min, int max, int delegate(int) comp, bool lower = true) return res; } + +static this() +{ + // To prevent linker from stripping the symbol + auto f = &compress_for_stb_image_write; +}