Re: linking the same static library into two places

2011-07-07 Thread Greg Parker
On Jul 7, 2011, at 5:25 PM, Jens Alfke wrote: > On Jul 7, 2011, at 4:25 PM, Greg Parker wrote: >> This is less safe than you might like. On iOS and 64-bit Mac, you may end up >> with both copies of the class in use simultaneously. That means two separate >> invocations of +initialize, two separat

Re: linking the same static library into two places

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 4:25 PM, Greg Parker wrote: > This is less safe than you might like. On iOS and 64-bit Mac, you may end up > with both copies of the class in use simultaneously. That means two separate > invocations of +initialize, two separate locks for @synchronized([MyClass > class]), et

Re: linking the same static library into two places

2011-07-07 Thread Greg Parker
On Jul 7, 2011, at 4:03 PM, Jens Alfke wrote: > On Jul 7, 2011, at 3:58 PM, Kenny Leung wrote: >> Class X is implemented in both and . One of >> the two will be used. Which one is undefined. >> The same happens with dynamically loaded bundles, etc... >> Is there any good way around this? > >

Re: linking the same static library into two places

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 3:58 PM, Kenny Leung wrote: > Class X is implemented in both and . One of > the two will be used. Which one is undefined. > The same happens with dynamically loaded bundles, etc... > Is there any good way around this? Not putting the classes into a static library. If you

linking the same static library into two places

2011-07-07 Thread Kenny Leung
Hi All. Hopefully somebody can help me with this: I have a static library with utilities that I like to use everywhere (it's a static library because we use it on iPhone as well). So I link it in with a framwork that I'm writing, and also link it in with an application that uses that framework