How can I configure or use correctly ffmpeg_next with Windows

I am trying to just use ffmpeg_next, but I am having a lot of trouble just getting it to work or compile correctly

I have in toml

[dependencies]
ffmpeg-next="*"

I installed the shared ffmpeg library, including the different binaries, libraries, includes, etc
and the lib/pkgconfig

I installed pkg-config-lite

ffmpeg and pkg-config-lite work correctly on terminal on their own, but when I use: cargo build I get this error:

error: failed to run custom build command for `ffmpeg-sys-next v6.1.0`

Caused by:
  process didn't exit successfully: `C:\Users\Santiago\Documents\Rust\vp9_encoder\target\debug\build\ffmpeg-sys-next-7f70885df708b488\build-script-build` (exit code: 101)

I used the --verbose flag, it still doesn't say anything in particular.

Could try
ffmpeg-next = {version = "8.0.0", features = ["build"]}

Which I think downloads the newest compatible ffmpeg, builds and statically links it. But I've not tried it on windows. Note that it drastically slows building the ffmpeg-next parts.

Also could try the the gnu build target x86_64-pc-windows-gnu, maybe ffmpeg has issues with msvc.

I'm away from windows right now but it should be roughly:
Once
rustup target add x86_64-pc-windows-gnu

Then
cargo build --target x86_64-pc-windows-gnu

Thanks, I finally figured out the problem. Using build really helped, but I also had to install the c++ build tools from vscode, clang, and the previous 7.1.0 version of ffmpeg