This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Could you attach the .h file? Are you sure #ifndef __FILENNAME_H #define __FILENNAME_H .... .... inline .... inline .... .... .... #endif works properly? Regards On Thursday 03 June 2004 01:56, rainfeng _micro wrote: > Dear Mr: > I define an inline function in a header file with "__inline__ void > funcname....", and include the header file to two C file .An error went out > and the compiler always complain " multiple definition of funcname...". > For example, the function SnGetBufIflag and function SnClearBufIflag > are inline functions defined in TouCAN.h, which is included both in > 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 > > PS: I am using gcc-3.3.2 for powerpc-eabi target > Thank you for help > > _________________________________________________________________ > 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn > > > ------ > Want more information? See the CrossGCC FAQ, > http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to > crossgcc-unsubscribe@sources.redhat.com ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |