Medium to large-scale projects

Ah, are you implying I’m Shylock? LOL.
Seriously though, yes, in C each .c file generally produces a single .o file, but you also have to consider that it also has to read every #include’d .h file and nested therein. In C++ since the beginning, and in modern C, it’s not possible to use some function without declaring it somewhere first, it’s not like K&R C where you could invoke printfwithout including the necessary header, so a .cfile cannot be analyzed in a completely “standalone” fashion.

In C++20 and later, with the introduction of the importand export of modules, the “whole-program analysis” also needs to occur, perhaps not as deep as what Zig does. This has affected C++ build systems like CMake because a “once-over-lightly” compilation pass has to occur before CMake and other build systems can analyze inter-module dependencies. Which brings me to my very first post here, which has gone unanswered and, although I haven’t really tried zig c++ yet, it seems it won’t work for compiling a C++ file that imports some other module, whether std or not.