diff --git a/build-wine32.txt b/build-wine32.txt index ba8d34a86..4b830f7ef 100644 --- a/build-wine32.txt +++ b/build-wine32.txt @@ -7,8 +7,8 @@ strip = 'strip' [properties] needs_exe_wrapper = true -c_args=['-m32', '-msse', '-msse2'] -cpp_args=['-m32', '--no-gnu-unique', '-msse', '-msse2'] +c_args=['-m32', '-msse', '-msse2', '-fvisibility=hidden'] +cpp_args=['-m32', '--no-gnu-unique', '-msse', '-msse2', '-fvisibility=hidden', '-fvisibility-inlines-hidden'] cpp_link_args=['-m32', '-mwindows'] [host_machine] diff --git a/build-wine64.txt b/build-wine64.txt index b3e028bb6..09b1c38b8 100644 --- a/build-wine64.txt +++ b/build-wine64.txt @@ -7,8 +7,8 @@ strip = 'strip' [properties] needs_exe_wrapper = true -c_args=['-m64'] -cpp_args=['-m64', '--no-gnu-unique'] +c_args=['-m64', '-fvisibility=hidden'] +cpp_args=['-m64', '--no-gnu-unique', '-fvisibility=hidden', '-fvisibility-inlines-hidden'] cpp_link_args=['-m64', '-mwindows'] [host_machine] diff --git a/src/dxgi/dxgi_include.h b/src/dxgi/dxgi_include.h index 6071dc2ac..ffed0d606 100644 --- a/src/dxgi/dxgi_include.h +++ b/src/dxgi/dxgi_include.h @@ -1,7 +1,9 @@ #pragma once //for some reason we need to specify __declspec(dllexport) for MinGW -#if defined(_MSC_VER) || defined(__WINE__) +#if defined(__WINE__) + #define DLLEXPORT __attribute__((visibility("default"))) +#elif defined(_MSC_VER) #define DLLEXPORT #else #define DLLEXPORT __declspec(dllexport)