Skip to content

Commit c03e1a7

Browse files
Loic Le Pagenirbheek
authored andcommitted
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.
1 parent 8fc18b3 commit c03e1a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ project('proxy-libintl', 'c',
55
'c_std=gnu99',
66
'buildtype=debugoptimized' ])
77

8+
if get_option('default_library') == 'static'
9+
add_project_arguments('-DG_INTL_STATIC_COMPILATION', language : 'c')
10+
endif
11+
812
install_headers('libintl.h')
913

1014
intl_lib = library('intl',

0 commit comments

Comments
 (0)