On the master branch @ 9a7206a34e3179d7280de98a818a13374178ee7b, linking bitcoin-chainstate.exe
to bitcoinkernel.dll
fails:
0> cmake -B build --preset vs2022-static -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON
1> cmake --build build --config Release -t bitcoin-chainstate
2...
3LINK : fatal error LNK1181: cannot open input file 'kernel\Release\bitcoinkernel.lib' [C:\Users\hebasto\source\repos\bitcoin\build-static\src\bitcoin-chainstate.vcxproj]
This PR fixes this issue and enables the same scenario in the “Win64 native” CI job.
The first commit is necessary; otherwise, linking fails and produces a different error:
0bitcoin-chainstate.obj : error LNK2019: unresolved external symbol "class AnnotatedMixin<class std::recursive_mutex> cs_main" (?cs_main@@3V?$AnnotatedMixin@Vrecursive_mutex@std@@@@A) referenced in function main [D:\a\bitcoin\bitcoin\build\src\bitcoin-chainstate.vcxproj]
1D:\a\bitcoin\bitcoin\build\src\Release\bitcoin-chainstate.exe : fatal error LNK1120: 1 unresolved externals [D:\a\bitcoin\bitcoin\build\src\bitcoin-chainstate.vcxproj]