Skip to content

Commit

Permalink
Fix Windows static build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Loic Le Page authored and nirbheek committed Jan 22, 2022
1 parent 8fc18b3 commit c03e1a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c03e1a7

Please sign in to comment.