inline functions in header file

Kostadin Dabov kostadin@globaltech-bg.com
Fri Jun 4 08:35:00 GMT 2004


This issue is C-specific, this is from gcc manual:
"Note that in C and Objective-C, unlike C++, the inline keyword does not 
affect the linkage of the function. "

If you wish that the function had no external linkage, then add 'static' to 
the its definition. 

p.s. Note that although the function had external linkage, it was most 
probably properly inlined - the one does not affect the other.

> TouCAN.c and can_ccp.c,the following is the error message:
>    can_ccp.o(.text+0x0): In function `SnGetBufIflag':
>    /cygdrive/f/develop/TouCAN.h:80: multiple definition of `SnGetBufIflag'
>    toucan.o(.text+0x0):/cygdrive/f/develop/TouCAN.h:80: first defined here
>    can_ccp.o(.text+0x70): In function `SnClearBufIflag':
>    /cygdrive/f/develop/TouCAN.h:90: multiple definition of
> `SnClearBufIflag'
>    toucan.o(.text+0x70):/cygdrive/f/develop/TouCAN.h:90: first defined here
>    make: *** [hiwd] Error 1

-- 
Kostadin Dabov <kostadin@globaltech-bg.com> 
Globaltech Bulgaria, LTD

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list