A snippet from below solved it for me.
‘I had’ built the static library with the /GL (Whole Program Optimization) compiler switch, which requires Link Time Code Generation (/LTCG) when the static library is subsequently linked. These features require that all linked modules be built by the same version of the compiler. In fact, if precompiled headers are used, the same machine must build and link all the involved object code. Therefore, it is highly recommended that static libraries not be built with the /GL switch, since their intended use is quite frequently to support reuse by others.
So I turned off this switch on my static library, and subsequently was able to build and test.
https://developercommunity.visualstudio.com/t/cannot-build-after-vs-update-link-error/1348830