Re: Inline function - multiple includes during link
Re: Inline function - multiple includes during link
- Subject: Re: Inline function - multiple includes during link
- From: Steve Sisak <email@hidden>
- Date: Wed, 14 Feb 2007 21:25:55 -0500
At 2:09 PM -0800 2/14/07, George Lawrence Storm wrote:
If I change:
#define __inline __inline__
to:
#define __inline extern __inline__
It will compile and link, however by doing this I assume I never
actually define the function.
Assuming this is C++, try:
#define __inline inline
While "inline" isn't guaranteed to inline a function, it is
guaranteed not to generate a link error if there are multiple
definitions.
If you don't care about multiple copies of the code if the function
is not inlined,
#define __inline static inline
will also work.
HTH,
-Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden