On 1/23/2026 7:47 PM, crueter via ffmpeg-devel wrote: > Recently, I've been attempting to get FFmpeg building on MSVC. Normally > FFmpeg is built with MinGW for Windows, but it is 100% possible to build > it on MSVC. For those curious, I need this as a *static* library, and > attempting to link statically built MinGW libraries on MSVC generally > doesn't make for a fun time. > > However, previously I had to rely on several horrible hacks, such as > running everything through the MSYS shell (not ideal in the slightest), > and then manually implanting `cl.exe` and others into PATH. This is not > only a huge pain, but actually caused significant problems as it made it > much harder to make pretty much any changes whatsoever without > inevitably breaking everything. I'm fairly sure you're required to use an environment like Msys2 to compile FFmpeg. Looking at https://fate.ffmpeg.org/report.cgi?slot=amd64-msvc&time=20260123104905 i see compiling statically with msvc is not a problem. The configure script has plenty of msvc specific considerations. You may have forgotten to to pass --toolchain=msvc to it. > > Thus, when I had to make some significant changes to my script, I ended > up facing a large number of issues. In no particular order: > >  * pkg-config is basically nonexistent on Windows, and is barely >    functional when it does exist. This was a problem for Vulkan, >    ffnvcodec, openssl, and others. Every package we check for with pkg-config will have a .pc file on a Windows install as it will on a Linux one. But i suspect quite a few will require you to build them with mingw-w64, though. Keep in mind that pkg-config requires you to pass --static to get the proper command line arguments to link to dependencies statically. In the context of ffmpeg configure, that'd be done with --pkg-config-flags="--static".