This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling and Linking help
> Hi.
> 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.
corey