Mail Archives: djgpp/1999/12/31/12:57:00
sl (junk AT bbs DOT darktech DOT org) wrote:
: Hi,
: I'd like to make some of my functions 'inline'.. As far as I know,
: placing the word 'inline' right before the function implementation should be
: enough.. Unfortunately when I do this and I call these functions from other
: source-files, I get "unknown reference" errors.. I was told this had to do
: with the fact that I am calling inline functions in one source-file from
: ANOTHER source-file.. Supposidly that's illegal..
: Could someone please explain this to me? I would like to inline my
: GFX library functions (such as plot()ing a pixel) but be able to use them
: from other files.. This seems reasonable enough no? :)
I'm assuming this is C, albeit, GNU C, gcc. Did you have a header file
containing the prototype :
extern __inline__ function ();
and that header is included when needed.
BTW, inline functions really work in gcc, when optimization is
turn on. In C++, IIRC, any methods define in the class are inline
by default.
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
- Raw text -