Re: Port from Win to OSX with Inline functions
Re: Port from Win to OSX with Inline functions
- Subject: Re: Port from Win to OSX with Inline functions
- From: Nat! <email@hidden>
- Date: Sat, 7 Oct 2006 02:10:26 +0200
Am 06.10.2006 um 22:48 schrieb Chris Edgington:
I'm porting a large application from Windows to OSX. I'm trying to
minimize changes to my clients codebase. One area that is giving me
problems is inline functions. All over the place the client has
functions in header files marked as inline (this is a performance-
critical app). These header files get included by multiple .C
files. When building with gcc on OSX - what ends up happening is
that the compiler puts a copy of each inlined function in each .o
file, then when I goto link I get linker errors because of multiple
definitions of the same symbol.
Declare them as static inline.
Like
static inline void foo();
Ciao
Nat!
------------------------------------------------------
"It's always easier to ask forgiveness than it is to
get permission." -- Rear Admiral Hopper
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden