@derickflorian Been a long time since I've worked in C, but if I recall correctly, it processes all of the header files first, using them to build a map of functions and variables and classes that can be invoked (and which external libraries they require).
Then, it compiles the actual code files down into machine-readable binary code.
Then, the linker goes through and actually links that map from the headers with the built code (and any included libraries).
So, yes, the names of the c files don't matter that much. The names of the header files matter, primarily for include purposes.
In C++, the names of the cpp files matter more from a style perspective because the classes are more self-contained and should generally be in matching code/header files.
@derickflorian "So if I include a header and the function is defined elsewhere it while find the function definition and paste or link it into the file that calls that function?"
Essentially, yes. "Paste" in the case of inline functions and "link" in every other case.
@LouisIngenthron Thank you, that is really helpful. It makes sense but I didn’t realize the linker came at the end. That explains why it wasn’t generating a map file when I had a compilation error.
The header file thing is interesting to me too. So if I include a header and the function is defined elsewhere it while find the function definition and paste or link it into the file that calls that function?
Thank you for responding and taking the time to explain how this works. I was at the point where I didn’t even really know where to start looking.