From c03e1a74b17fa7ec467e110130775409e4828a4c Mon Sep 17 00:00:00 2001 From: Loic Le Page Date: Thu, 13 Jan 2022 18:46:10 +0100 Subject: [PATCH] Fix Windows static build On Windows, static compilation needs G_INTL_STATIC_COMPILATION to be also defined during compilation. Else functions are exported with __declspec(dllexport) which causes issues when importing symbols during linkage with the static library. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index e72b498..957bf18 100644 --- a/meson.build +++ b/meson.build @@ -5,6 +5,10 @@ project('proxy-libintl', 'c', 'c_std=gnu99', 'buildtype=debugoptimized' ]) +if get_option('default_library') == 'static' + add_project_arguments('-DG_INTL_STATIC_COMPILATION', language : 'c') +endif + install_headers('libintl.h') intl_lib = library('intl',