RE: [AD] clear() problem and BeOS

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Title: RE: [AD] clear() problem and BeOS

Peter Wang writes:
> > > Better to find out why "extern inline" doesn't work.  Maybe
> > > BeOS version of gcc is different?
> >
> > "extern inline" is inlined only in optimized compilation.
>
> Ah, crap.  Then we are back to the macro for gcc?

The way to make extern inline work in a library situation is to
write all your header functions using a macro eg. EXTERN_INLINE,
which is normally defined to "extern inline". Then have a .c
file in your library build, eg. inline.c, which #defines
EXTERN_INLINE away to nothing before including all your headers.
This will force a version of the inline functions to be compiled
into an object, so debug mode programs will link correctly,
but optimised compiles will always inline the copy directly from
the header so will never need to link with the inline object.


        Shawn.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/