I tried building the solution generated by cmake but it generates a dozen or so errors of that kind. The include trees are pretty deep and I do not know which include specifically generates _INC_WINAPIFAMILY, so I'm kinda stuck here. Removing the #if predictably makes it worse. I suspect this comes from possibly recent changes in spdlog. Nothing else changed from your code
I tried building the solution generated by cmake but it generates a dozen or so errors of that kind. The include trees are pretty deep and I do not know which include specifically generates _INC_WINAPIFAMILY, so I'm kinda stuck here. Removing the #if predictably makes it worse. I suspect this comes from possibly recent changes in spdlog. Nothing else changed from your code