I'm going through a c++ h/cpp pair and inlining some functions to speed up my code. This is actually just c, there are no classes involved. I can't see any difference, but for some of these functions I can inline the header definition and/or the cpp code and get no LNK2001 error ... and I can tell the compiler is inlining now and was not before, because the executable gets bigger after inlining. For other functions, I can't inline at all without getting LNK2001, which I know means I need to put the whole function in the header. All these functions are being called from the same (other) translation units. Why don't I get LNK2001 error for all of them?
I'm pretty sure this is not answered elsewhere ...