site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com FYI ... found a short-term solution ... and some interesting things ... -Chris On Oct 6, 2006, at 4:48 PM, Chris Edgington wrote: Anybody have any thoughts on how to resolve this? Thanks, -Chris _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 1) No inlining at all happens unless optimization is enabled - regardless of the always_inline attribute. 2) By default - an inlined function will also have a regular non- inlined copy in the object file. So - the short-term answer is to redefine __INLINE as "extern inline __attribute((always_inline))" and to build with optimizations enabled. Ultimately, however, I will likely need to change the prorotypes and function definitions to be static - so they work whether or not they are inlined. 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. This email sent to site_archiver@lists.apple.com