From 7731535b1e36354b0c510a4990034a0209431ca5 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Wed, 23 Sep 2026 08:39:18 +0200 Subject: [PATCH] microtexexport.h: a MICROTEX_STATIC branch, so that a static microtex.lib links on MSVC The MSVC branch only knows dllexport (MICROTEX_LIBRARY defined) and dllimport (not defined): consumers of a static microtex.lib see dllimport and fail to link (unresolved __imp_* symbols, e.g. __imp_??0Stroke@microtex@@QEAA@XZ). With MICROTEX_STATIC defined, MICROTEX_EXPORT is empty. --- lib/microtexexport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/microtexexport.h b/lib/microtexexport.h index 71bcd416..fc686aae 100644 --- a/lib/microtexexport.h +++ b/lib/microtexexport.h @@ -7,7 +7,9 @@ // msvc #ifdef _MSC_VER -# if defined(MICROTEX_LIBRARY) +# if defined(MICROTEX_STATIC) // static library: no import/export attribute +# define MICROTEX_EXPORT +# elif defined(MICROTEX_LIBRARY) # define MICROTEX_EXPORT __declspec(dllexport) # else # define MICROTEX_EXPORT __declspec(dllimport)