Using gstreamer-full in a Rust project

Hi! I’m trying to use gstreamer-full in a Rust project, but I’m not too familiar with C or Meson, so I would really appreciate some help with the issues I’m running into.

For context, my project will need to support Windows, Linux, and Mac, but right now, I’m trying to get Windows to work first. My first choice would be a full static build, but I’m also okay with dynamically linking to gstreamer-full.

I’m using the latest versions of the Rust bindings (gstreamer 0.23.3, gstreamer-sys 0.23.3, gstreamer-app 0.23.3, gstreamer-app-sys 0.23.2, gstreamer-base 0.23.3, gstreamer-base-sys 0.23.3). If it matters, I don’t depend on them directly, but rather transitively via iced_video_player.

If I just use the prebuilt Windows binaries for 1.24.9, everything works fine, but I’d really like to build and use a full version.

Option 1: full static on 1.24.9

I can build GStreamer successfully with these options:

$ cd gstreamer
$ rm -rf ./builddir
$ git checkout 1.24.9
$ meson setup --default-library=static -Dgst-full-target-type=static_library -Dgpl=disabled -Ddevtools=disabled -Dges=disabled -Drtsp_server=disabled -Dgst-examples=disabled -Dpython=disabled -Dtls=disabled -Dlibnice=disabled -Dtools=disabled -Dqt5=disabled -Dqt6=disabled -Dwebrtc=disabled -Dtests=disabled -Dexamples=disabled -Dintrospection=disabled builddir
$ meson compile -C builddir

I can see libgstreamer-full-1.0.a in the build dir. Then I build my Rust project with:

$ PKG_CONFIG_PATH=.../gstreamer/builddir/meson-uninstalled cargo build

However, the Rust build fails with:

  = note: libgstreamer-1.0.a(gst.c.obj) : error LNK2019: unresolved external symbol gst_init_static_plugins referenced in function init_post

I also tried on main (c024c5e3bfb4f671b9bc5af267053bb9ebb85c5c), but I get the same issue.

Option 2: full shared library

Like option 1, except without -Dgst-full-target-type=static_library. I can see gstreamer-full-1.0.{dll,exp,lib,pdb} in the build dir.

In this case, the Rust build succeeds. However, when I open the app and try to load a video, I get no element "playbin". It looks like playbin comes from the playback feature of gst-plugins-base, which I think is enabled automatically (auto), so I don’t understand why it would be missing.

Also, it doesn’t seem to matter whether I put a copy of gstreamer-full-1.0.dll in the same folder with my compiled executable. Is that right? I’d expect it to complain about a missing DLL at runtime if it’s not in the same folder.

Using the version of ldd that comes with Git Bash for Windows, I don’t see any entries for GStreamer:

ldd
$ ldd ./my-app.exe
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffd60990000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffd5fb40000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffd5e2c0000)
        bcryptprimitives.dll => /c/WINDOWS/System32/bcryptprimitives.dll (0x7ffd5e120000)
        user32.dll => /c/WINDOWS/System32/user32.dll (0x7ffd5e990000)
        win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7ffd5e0f0000)
        GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7ffd5fa90000)
        gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7ffd5e1a0000)
        msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7ffd5ddb0000)
        ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7ffd5dc90000)
        shell32.dll => /c/WINDOWS/System32/shell32.dll (0x7ffd5eb40000)
        ole32.dll => /c/WINDOWS/System32/ole32.dll (0x7ffd5e7e0000)
        combase.dll => /c/WINDOWS/System32/combase.dll (0x7ffd603d0000)
        RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ffd60780000)
        ws2_32.dll => /c/WINDOWS/System32/ws2_32.dll (0x7ffd5fc10000)
        advapi32.dll => /c/WINDOWS/System32/advapi32.dll (0x7ffd60150000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffd5f3c0000)
        sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7ffd608a0000)
        bcrypt.dll => /c/WINDOWS/System32/bcrypt.dll (0x7ffd5e680000)
        oleaut32.dll => /c/WINDOWS/System32/oleaut32.dll (0x7ffd5f960000)
        imm32.dll => /c/WINDOWS/System32/imm32.dll (0x7ffd5fa50000)
        opengl32.dll => /c/WINDOWS/SYSTEM32/opengl32.dll (0x7ffd11bd0000)
        dwmapi.dll => /c/WINDOWS/SYSTEM32/dwmapi.dll (0x7ffd5ad50000)
        d3dcompiler_47.dll => /c/WINDOWS/SYSTEM32/d3dcompiler_47.dll (0x7ffd552b0000)
        uxtheme.dll => /c/WINDOWS/SYSTEM32/uxtheme.dll (0x7ffd5aac0000)
        VCRUNTIME140.dll => /c/WINDOWS/SYSTEM32/VCRUNTIME140.dll (0x7ffd3eeb0000)
        GLU32.dll => /c/WINDOWS/SYSTEM32/GLU32.dll (0x7ffd11ba0000)
        CRYPTSP.dll => /c/WINDOWS/SYSTEM32/CRYPTSP.dll (0x7ffd5d490000)
        dxcore.dll => /c/WINDOWS/SYSTEM32/dxcore.dll (0x7ffd5ae20000)
        CRYPTBASE.DLL => /c/WINDOWS/SYSTEM32/CRYPTBASE.DLL (0x7ffd5d4b0000)

Option 3: full shared library + +crt-static

Same as option 2, but in rust-project/.cargo/config.toml, I’d like to set this option:

[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

That option typically works fine for me in Rust projects with only Rust dependencies. However, in this case, it causes the Rust build to fail with several missing __imp symbols:

errors
          libgstreamer-1.0.a(gstvalue.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function _vsscanf_l␍
          libgstreamer-1.0.a(gstpluginfeature.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf␍
          libgstreamer-1.0.a(gstpreset.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf␍
          libgstreamer-1.0.a(gstdatetime.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf␍
          libgstreamer-1.0.a(gstvalue.c.obj) : error LNK2019: unresolved external symbol __imp_strtol referenced in function gst_value_deserialize_enum␍
          libgstreamer-1.0.a(gst.c.obj) : error LNK2001: unresolved external symbol __imp_strtol␍
          libglib-2.0.a(gkeyfile.c.obj) : error LNK2001: unresolved external symbol __imp_strtol␍
          libglib-2.0.a(goption.c.obj) : error LNK2001: unresolved external symbol __imp_strtol␍
          libglib-2.0.a(gtimer.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libglib-2.0.a(guri.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libgstreamer-1.0.a(gstvalue.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libgstreamer-1.0.a(gstinfo.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libgstreamer-1.0.a(gstpluginfeature.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libglib-2.0.a(gmarkup.c.obj) : error LNK2001: unresolved external symbol __imp_strtoul␍
          libgstreamer-1.0.a(gstvalue.c.obj) : error LNK2019: unresolved external symbol __imp_isxdigit referenced in function gst_value_deserialize_buffer␍
          libglib-2.0.a(gutf8.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libglib-2.0.a(gtimezone.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libglib-2.0.a(gvariant-parser.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libgstreamer-1.0.a(gstinfo.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libgstreamer-1.0.a(gstregistrybinary.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libgobject-2.0.a(gparam.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2001: unresolved external symbol __imp_strncpy␍
          libgstreamer-1.0.a(gstinfo.c.obj) : error LNK2019: unresolved external symbol __imp_fwrite referenced in function _gst_debug_fprintf␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2001: unresolved external symbol __imp_fwrite␍
          libglib-2.0.a(gtestutils.c.obj) : error LNK2001: unresolved external symbol __imp_fwrite␍
          libglib-2.0.a(printf.c.obj) : error LNK2001: unresolved external symbol __imp_fwrite␍
          libglib-2.0.a(gtranslit.c.obj) : error LNK2001: unresolved external symbol __imp_strcspn␍
          libgstreamer-1.0.a(gsturi.c.obj) : error LNK2001: unresolved external symbol __imp_strcspn␍
          libglib-2.0.a(gdatetime.c.obj) : error LNK2001: unresolved external symbol __imp_strcspn␍
          libglib-2.0.a(gvariant-parser.c.obj) : error LNK2001: unresolved external symbol __imp_strcspn␍
          libglib-2.0.a(guri.c.obj) : error LNK2001: unresolved external symbol __imp_strcspn␍
          libgstreamer-1.0.a(gsturi.c.obj) : error LNK2019: unresolved external symbol __imp_strspn referenced in function _gst_uri_from_string_internal␍
          libglib-2.0.a(gvariant-serialiser.c.obj) : error LNK2001: unresolved external symbol __imp_strspn␍
          libgstreamer-1.0.a(gstpluginloader-win32.c.obj) : error LNK2019: unresolved external symbol __imp__wcsdup referenced in function generate_env_string␍
          libgstreamer-1.0.a(gstpluginloader-win32.c.obj) : error LNK2019: unresolved external symbol __imp__aligned_free referenced in function gst_plugin_loader_free␍
          libglib-2.0.a(gmem.c.obj) : error LNK2001: unresolved external symbol __imp__aligned_free␍
          libgstreamer-1.0.a(gstpluginloader-win32.c.obj) : error LNK2019: unresolved external symbol __imp__aligned_malloc referenced in function win32_plugin_loader_init␍
          libglib-2.0.a(gmem.c.obj) : error LNK2001: unresolved external symbol __imp__aligned_malloc␍
          libgstreamer-1.0.a(gstpluginloader-win32.c.obj) : error LNK2019: unresolved external symbol __imp__aligned_realloc referenced in function win32_plugin_loader_resize␍
          libgstreamer-1.0.a(meson-generated_.._parse_lex.priv_gst_parse_yy.c.obj) : error LNK2019: unresolved external symbol __imp_clearerr referenced in function yy_get_next_buffer␍
          libgstreamer-1.0.a(meson-generated_.._parse_lex.priv_gst_parse_yy.c.obj) : error LNK2019: unresolved external symbol __imp_ferror referenced in function yy_get_next_buffer␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2001: unresolved external symbol __imp_ferror␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2001: unresolved external symbol __imp_ferror␍
          libgstreamer-1.0.a(meson-generated_.._parse_lex.priv_gst_parse_yy.c.obj) : error LNK2019: unresolved external symbol __imp_fread referenced in function yy_get_next_buffer␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2001: unresolved external symbol __imp_fread␍
          libgstreamer-1.0.a(meson-generated_.._parse_lex.priv_gst_parse_yy.c.obj) : error LNK2019: unresolved external symbol __imp_getc referenced in function yy_get_next_buffer␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp_close referenced in function g_mkdir␍
          libglib-2.0.a(gmappedfile.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp_close␍
          libgmodule-2.0.a(gmodule.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          libglib-2.0.a(gkeyfile.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2001: unresolved external symbol __imp_close␍
          libglib-2.0.a(gthread-win32.c.obj) : error LNK2019: unresolved external symbol __imp__beginthreadex referenced in function g_system_thread_new␍
          libglib-2.0.a(gpoll.c.obj) : error LNK2001: unresolved external symbol __imp__beginthreadex␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2001: unresolved external symbol __imp__beginthreadex␍
          libglib-2.0.a(gthread-win32.c.obj) : error LNK2019: unresolved external symbol __imp__endthreadex referenced in function g_system_thread_exit␍
          libglib-2.0.a(gpoll.c.obj) : error LNK2001: unresolved external symbol __imp__endthreadex␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_strtod referenced in function g_ascii_strtod␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp__stricmp referenced in function g_strcasecmp␍
          libglib-2.0.a(gconvert.c.obj) : error LNK2001: unresolved external symbol __imp__stricmp␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2001: unresolved external symbol __imp__stricmp␍
          libglib-2.0.a(glib-init.c.obj) : error LNK2001: unresolved external symbol __imp__stricmp␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_isupper referenced in function g_strdown␍
          libglib-2.0.a(gstring.c.obj) : error LNK2001: unresolved external symbol __imp_isupper␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_islower referenced in function g_strup␍
          libglib-2.0.a(gstring.c.obj) : error LNK2001: unresolved external symbol __imp_islower␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_isdigit referenced in function g_ascii_formatd␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_toupper referenced in function g_strup␍
          libglib-2.0.a(gstring.c.obj) : error LNK2001: unresolved external symbol __imp_toupper␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2001: unresolved external symbol __imp_toupper␍
          libglib-2.0.a(gstrfuncs.c.obj) : error LNK2019: unresolved external symbol __imp_tolower referenced in function g_strdown␍
          libglib-2.0.a(gstring.c.obj) : error LNK2001: unresolved external symbol __imp_tolower␍
          libglib-2.0.a(glib-init.c.obj) : error LNK2001: unresolved external symbol __imp_tolower␍
          libpcre2-8.a(src_pcre2_compile.c.obj) : error LNK2001: unresolved external symbol __imp_tolower␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2019: unresolved external symbol __imp_fputs referenced in function _g_log_fallback_handler␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2019: unresolved external symbol __imp_fileno referenced in function g_log_writer_default␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2001: unresolved external symbol __imp_fileno␍
          OLDNAMES.lib(fileno.obi) : error LNK2001: unresolved external symbol __imp_fileno␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2019: unresolved external symbol __imp_wcsspn referenced in function g_log_writer_supports_color␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2019: unresolved external symbol __imp_strftime referenced in function g_log_writer_format_fields␍
          libglib-2.0.a(gmessages.c.obj) : error LNK2019: unresolved external symbol __imp_getpid referenced in function g_log_writer_format_fields␍
          OLDNAMES.lib(getpid.obi) : error LNK2001: unresolved external symbol __imp_getpid␍
          libglib-2.0.a(gkeyfile.c.obj) : error LNK2019: unresolved external symbol __imp__fstat64 referenced in function g_key_file_load_from_fd␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2001: unresolved external symbol __imp__fstat64␍
          libglib-2.0.a(gmappedfile.c.obj) : error LNK2001: unresolved external symbol __imp__fstat64␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2001: unresolved external symbol __imp__fstat64␍
          OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp_read␍
          libglib-2.0.a(gkeyfile.c.obj) : error LNK2001: unresolved external symbol __imp_read␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2001: unresolved external symbol __imp_read␍
          libglib-2.0.a(gscanner.c.obj) : error LNK2001: unresolved external symbol __imp_read␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2001: unresolved external symbol __imp_read␍
          libglib-2.0.a(gdate.c.obj) : error LNK2019: unresolved external symbol __imp__localtime64 referenced in function _g_localtime␍
          libglib-2.0.a(gdate.c.obj) : error LNK2019: unresolved external symbol __imp_setlocale referenced in function g_date_prepare_to_parse␍
          libglib-2.0.a(gtranslit.c.obj) : error LNK2001: unresolved external symbol __imp_setlocale␍
          libglib-2.0.a(guniprop.c.obj) : error LNK2019: unresolved external symbol __imp_bsearch referenced in function g_unichar_iswide␍
          libglib-2.0.a(gtranslit.c.obj) : error LNK2001: unresolved external symbol __imp_bsearch␍
          libglib-2.0.a(gutils.c.obj) : error LNK2019: unresolved external symbol __imp_wcstol referenced in function get_windows_8_1_update␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2019: unresolved external symbol __imp_feof referenced in function get_contents_stdio␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2019: unresolved external symbol __imp_strdup referenced in function g_file_read_link␍
          OLDNAMES.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp_strdup␍
          OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp_write␍
          libglib-2.0.a(gfileutils.c.obj) : error LNK2001: unresolved external symbol __imp_write␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2001: unresolved external symbol __imp_write␍
          libglib-2.0.a(gtestutils.c.obj) : error LNK2001: unresolved external symbol __imp_write␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2001: unresolved external symbol __imp_write␍
          libglib-2.0.a(genviron.c.obj) : error LNK2019: unresolved external symbol __imp__wputenv referenced in function g_setenv␍
          libglib-2.0.a(grand.c.obj) : error LNK2019: unresolved external symbol __imp_rand_s referenced in function g_rand_new␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2019: unresolved external symbol __imp__pipe referenced in function make_pipe␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2019: unresolved external symbol __imp__wspawnv referenced in function do_spawn_directly␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2019: unresolved external symbol __imp__wspawnve referenced in function do_spawn_directly␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2019: unresolved external symbol __imp__wspawnvp referenced in function do_spawn_directly␍
          libglib-2.0.a(gspawn-win32.c.obj) : error LNK2019: unresolved external symbol __imp__wspawnvpe referenced in function safe_wspawnvpe␍
          libglib-2.0.a(gtimer.c.obj) : error LNK2019: unresolved external symbol __imp__gmtime64 referenced in function g_time_val_to_iso8601␍
          libglib-2.0.a(gtimer.c.obj) : error LNK2019: unresolved external symbol __imp__mktime64 referenced in function g_time_val_from_iso8601␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2019: unresolved external symbol __imp_wcstoul referenced in function g_crash_handler_win32_init␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2019: unresolved external symbol __imp_freopen referenced in function g_console_win32_init␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2019: unresolved external symbol __imp__chsize referenced in function g_win32_ftruncate␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2019: unresolved external symbol __imp__dup2 referenced in function g_console_win32_init␍
          libglib-2.0.a(gwin32.c.obj) : error LNK2019: unresolved external symbol __imp_dup referenced in function g_console_win32_init␍
          OLDNAMES.lib(dup.obi) : error LNK2001: unresolved external symbol __imp_dup␍
          libglib-2.0.a(gunicollate.c.obj) : error LNK2019: unresolved external symbol __imp_strcoll referenced in function g_utf8_collate␍
          libglib-2.0.a(gunicollate.c.obj) : error LNK2019: unresolved external symbol __imp_strxfrm referenced in function g_utf8_collate_key␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp_wcsicmp referenced in function _g_win32_fill_statbuf_from_handle_info␍
          OLDNAMES.lib(wcsicmp.obi) : error LNK2001: unresolved external symbol __imp_wcsicmp␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wchdir referenced in function g_chdir␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wmkdir referenced in function g_mkdir␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wrmdir referenced in function g_remove␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__waccess referenced in function g_access␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wchmod referenced in function g_chmod␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wcreat referenced in function g_creat␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wunlink referenced in function g_unlink␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wopen referenced in function g_open␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wfopen referenced in function g_fopen␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wfreopen referenced in function g_freopen␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wremove referenced in function g_remove␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__getdrive referenced in function _g_win32_fill_statbuf_from_handle_info␍
          libglib-2.0.a(gstdio.c.obj) : error LNK2019: unresolved external symbol __imp__wutime64 referenced in function _wutime␍
          libglib-2.0.a(glib-init.c.obj) : error LNK2019: unresolved external symbol __imp_getenv referenced in function glib_init_ctor_wrapper␍
          libglib-2.0.a(gscanner.c.obj) : error LNK2019: unresolved external symbol __imp_lseek referenced in function g_scanner_get_char␍
          OLDNAMES.lib(lseek.obi) : error LNK2001: unresolved external symbol __imp_lseek␍
          libglib-2.0.a(giowin32.c.obj) : error LNK2019: unresolved external symbol __imp__kbhit referenced in function g_io_win32_check␍
          libglib-2.0.a(dirent_wdirent.c.obj) : error LNK2019: unresolved external symbol __imp__wfullpath referenced in function _wopendir␍
          libglib-2.0.a(dirent_wdirent.c.obj) : error LNK2019: unresolved external symbol __imp__wfindfirst64i32 referenced in function _wreaddir␍
          libglib-2.0.a(dirent_wdirent.c.obj) : error LNK2019: unresolved external symbol __imp__wfindnext64i32 referenced in function _wreaddir␍
          libglib-2.0.a(dirent_wdirent.c.obj) : error LNK2019: unresolved external symbol __imp__findclose referenced in function _wclosedir␍
          libglib-2.0.a(vasnprintf.c.obj) : error LNK2019: unresolved external symbol __imp_wcrtomb referenced in function _g_gnulib_vasnprintf␍
          libglib-2.0.a(vasnprintf.c.obj) : error LNK2019: unresolved external symbol __imp_frexp referenced in function decode_double␍
          libglib-2.0.a(printf-frexp.c.obj) : error LNK2001: unresolved external symbol __imp_frexp␍
          libglib-2.0.a(printf-frexpl.c.obj) : error LNK2001: unresolved external symbol __imp_frexp␍
          libintl.a(libintl.c.obj) : error LNK2019: unresolved external symbol __imp__strdup referenced in function dummy_textdomain␍
          OLDNAMES.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp__strdup␍
          libpcre2-8.a(src_pcre2_context.c.obj) : error LNK2019: unresolved external symbol __imp_ispunct referenced in function pcre2_set_glob_escape_8␍
          libpcre2-8.a(src_pcre2_compile.c.obj) : error LNK2019: unresolved external symbol __imp_isspace referenced in function get_ucp␍
          OLDNAMES.lib(getpid.obi) : error LNK2001: unresolved external symbol __imp__getpid␍
          OLDNAMES.lib(dup.obi) : error LNK2001: unresolved external symbol __imp__dup␍

Does GStreamer need any special options when combined with statically linking the MS VC++ runtime?

This is currently WIP and does not work out of the box yet. See Draft: meson: Full static linking of gstreamer-full (!7624) · Merge requests · GStreamer / gstreamer · GitLab and linked discussions.

1 Like

Thank you! I tried running the code from that PR and left a comment with some extra details: Draft: meson: Full static linking of gstreamer-full (!7624) · Merge requests · GStreamer / gstreamer · GitLab