Thanks a lot, Greg!

The reordering workaround makes me feel funny inside, but it does
appear to work.

<rdar://problem/8363909> has been filed.
-Sidney

On Tue, Aug 24, 2010 at 2:51 AM, Greg Parker <gpar...@apple.com> wrote:
> On Aug 23, 2010, at 12:46 PM, Greg Parker wrote:
>> On Aug 23, 2010, at 12:20 PM, Sidney San Martín wrote:
>>> I'm developing for 10.4.11 and up, using -respondsToSelector: and
>>> NSClassFromString() to target different OSs at runtime, and it's gone
>>> super-smoothly so far.
>>>
>>> I just ran into an issue I can't figure out on my own. When I link to
>>> the System Configuration framework and IOKit, and target 10.4, calling
>>> some SystemConfiguration framework functions crashes my application
>>> with "Symbol not found: _SCDynamicStoreCreate".
>>>
>>> This happens if I use any base SDK newer than 10.4, which is a bad
>>> thing for this project.
>>
>> This looks like a bug in the SDKs. I don't see the appropriate magic symbols 
>> that tell the linker the OS version when the function moved from IOKit to 
>> SystemConfiguration. You should file a bug report.
>>
>> You can use dlsym() to work around the problem.
>
> You can also be able to work around this by fiddling with the framework link 
> order in your build. The problem is that you want the symbol from 
> SystemConfiguration, but instead you're getting the symbol from IOKit. This 
> dies on 10.4 because the symbol was not in IOKit then. If you can modify the 
> link order so that SystemConfiguration comes before IOKit in the linker 
> command, then the linker should choose the symbol from SystemConfiguration.
>
> To do this in Xcode:
> 1. Find your app in the Targets list on the left side of the project window.
> 2. Open the Link Binary With Libraries build phase.
> 3. Drag SystemConfiguration.framework to the top of the list.
>
>
> --
> Greg Parker     Runtime Wrangler
>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to