Linking a static library on Windows using ProJucer?

I’m trying to include a static third party library in my build on Windows.

On Mac it took me about 20 minutes to make it work, but on Windows I’m completely stuck… I’m using JUCE 6 with Visual Studio 2017.

I’ve added the extra header and library search paths in ProJucer, along with the name of the library I want to include, of course. Th code compiles successfully, but the linker fails with the error message:

LINK : fatal error LNK1181: cannot open input file ‘TheLibName.obj’"

The library itself is a .lib file, by the way, so I don’t understand why it’s looking for a .obj file? Or is this just a “secondary error”?

Any suggestions on how I can get this to work?

Currently experiencing this same thing trying to get “libsamplerate” to work on Windows, similar set up works on macOS.

Header search path: ../../Modules/libsamplerate/include
External libraries to link: samplerate
Extra library search paths: ../../Modules/libsamplerate/build/src/Release

Having run:

mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release

Some conflicting reports on this, but I now have it building when I change “External libraries to link” to samplerate.lib