Compiling and Linking help
Wed Nov 9 16:07:00 GMT 2005
> It took me time to understand that ODR stays for One Definition Rule...
Yes, even #ifndef/#define/#endif wrappers wouldn't help here.
> I always thought that if compiler meets function definition, and he didn't
> meet it's declaration before, than it is implicit suggestion to inline
> the function
> (like with the inline member functions of a class).
No, only functions with a body that are defined inside of the class
declaration are implicitly inline, everything else must be marked
inline at definition.
What *might* work, and I've not tested this with gcc, is the use of a
pre-compiled heeader that includes your a.h file so that it isn't
constantly parsed and defined.
More information about the Gcc-help