From 5d267ed82eb0b11c8e9962ff3595d6fc9138915f Mon Sep 17 00:00:00 2001 From: david Date: Wed, 30 Sep 2026 17:00:55 +0200 Subject: [PATCH] build: link static C++ runtime into libmpv for libplacebo --- ci/build-libmpv-mingw64.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/build-libmpv-mingw64.sh b/ci/build-libmpv-mingw64.sh index 1a9c1d7..3c5cf4e 100644 --- a/ci/build-libmpv-mingw64.sh +++ b/ci/build-libmpv-mingw64.sh @@ -265,7 +265,10 @@ CFLAGS+=" -I'$prefix_dir/include'" LDFLAGS+=" -L'$prefix_dir/lib'" # Static CRT: fold libgcc / libstdc++ / winpthread into libmpv-2.dll so the # resulting DLL has no MinGW runtime DLL dependencies (the /MT equivalent). -LDFLAGS+=" -static -static-libgcc -static-libstdc++" +# -lstdc++ is added explicitly: libplacebo is C++ but libmpv is a C target, so +# meson's C link driver does not pull in the C++ runtime on its own. These +# flags land inside meson's --start-group/--end-group, so ordering is safe. +LDFLAGS+=" -static -static-libgcc -static-libstdc++ -lstdc++" export CFLAGS LDFLAGS build=mingw_build