From 18a3dfa4a195c60fdf8a1392faadfa7ccffd2c79 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Wed, 16 Aug 2023 13:07:36 -0300 Subject: [PATCH] gstreamer-full: Properly export gst_init_static_plugins for Win32 PE Currently, GStreamer relies throughout on ELF (and MachO)'s symbol table preserving the function address, instead of marking it as exportable, either through visibility:default or __declspec(dllexport). Part-of: --- meson.build | 3 ++- scripts/generate_init_static_plugins.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0e1abe55f9..48624cc081 100644 --- a/meson.build +++ b/meson.build @@ -437,6 +437,7 @@ if building_full # Build shared library gstfull = build_target('gstreamer-full-1.0', init_static_plugins_c, + c_args: ['-DBUILDING_GST'], target_type: get_option('gst-full-target-type'), link_args: gstfull_link_args, link_whole : exposed_libs, @@ -445,7 +446,7 @@ if building_full install : true, ) gst_full_c_flags = [] - if building_full_static + if building_full_static or get_option('default_library') == 'static' gst_full_c_flags += ['-DGST_STATIC_COMPILATION'] endif diff --git a/scripts/generate_init_static_plugins.py b/scripts/generate_init_static_plugins.py index af8b275541..01bc257835 100755 --- a/scripts/generate_init_static_plugins.py +++ b/scripts/generate_init_static_plugins.py @@ -14,6 +14,7 @@ $dynamic_types_declaration $plugins_declaration $giomodules_declaration +_GST_EXPORT void gst_init_static_plugins (void) {