Re: Linking against AVKit breaks app on 10.6

2016-09-16 Thread Andreas Falkenhahn
On 12.09.2016 at 21:41 Greg Parker wrote:


>> On Sep 12, 2016, at 12:40 AM, Alastair Houghton 
>>  wrote:

>>> On 10 Sep 2016, at 12:47, Andreas Falkenhahn  wrote:

>>> When I link my app against AVKit using

>>>   -framework AVKit

>>> it fails to load on 10.6 claiming

>>>   dyld: Library not loaded: 
>>> /System/Library/Frameworks/AVKit.framework/Versions/A/AVKit
>>>   Referenced from: ...
>>>   Reason: image not found
>>>   Trace/BPT trap

>> This is probably happening because AVKit doesn’t declare its symbols as 
>> weakly imported, while the other frameworks do.  You can force weak linking 
>> for that particular framework using

>>  -weak_framework AVKit

>> instead of just using the normal “-framework”.

> Please file a bug report. A missing availability attribute
> somewhere would be a bug in AVFoundation.

#28344751

-- 
Best regards,
 Andreas Falkenhahnmailto:andr...@falkenhahn.com


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Linking against AVKit breaks app on 10.6

2016-09-12 Thread Greg Parker

> On Sep 12, 2016, at 12:40 AM, Alastair Houghton 
>  wrote:
> 
>> On 10 Sep 2016, at 12:47, Andreas Falkenhahn  wrote:
>> 
>> When I link my app against AVKit using
>> 
>>   -framework AVKit
>> 
>> it fails to load on 10.6 claiming
>> 
>>   dyld: Library not loaded: 
>> /System/Library/Frameworks/AVKit.framework/Versions/A/AVKit
>>   Referenced from: ...
>>   Reason: image not found
>>   Trace/BPT trap
> 
> This is probably happening because AVKit doesn’t declare its symbols as 
> weakly imported, while the other frameworks do.  You can force weak linking 
> for that particular framework using
> 
>  -weak_framework AVKit
> 
> instead of just using the normal “-framework”.

Please file a bug report. A missing availability attribute somewhere would be a 
bug in AVFoundation.


-- 
Greg Parker gpar...@apple.com 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Linking against AVKit breaks app on 10.6

2016-09-12 Thread Alastair Houghton
On 10 Sep 2016, at 12:47, Andreas Falkenhahn  wrote:
> 
> When I link my app against AVKit using
> 
>-framework AVKit
> 
> it fails to load on 10.6 claiming
> 
>dyld: Library not loaded: 
> /System/Library/Frameworks/AVKit.framework/Versions/A/AVKit
>Referenced from: ...
>Reason: image not found
>Trace/BPT trap

This is probably happening because AVKit doesn’t declare its symbols as weakly 
imported, while the other frameworks do.  You can force weak linking for that 
particular framework using

  -weak_framework AVKit

instead of just using the normal “-framework”.  Note that you will need to make 
sure that the functions and classes you’re going to use actually exist if you 
rely on weak linking.  See 
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

Kind regards,

Alastair.

--
http://alastairs-place.net


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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