On Jan 29, 2013, at 6:12 PM, Todd Heberlein <todd_heberl...@mac.com> wrote:

> I mentioned this in a previous Xcode, but I thought it might be different 
> enough topic so I've given it a new subject and brought it over to Cocoa 
> (might be a more appropriate forum)
> 
> I have embedded private frameworks in a Cocoa Mac OS X application. The 
> development environment is OS X 10.8.2 and Xcode 4.5.2.
> 
> When I archive and deploy the application on Mountain Lion, it seems to work 
> fine, but when I move the application over to Lion (OS X 10.7.5) I get the 
> following error
> 
>> Application Specific Information:
>> dyld: launch, loading dependent libraries
>> 
>> Dyld Error Message:
>> Symbol not found: _OBJC_CLASS_$_NSObject
>> Referenced from: 
>> /Users/USER/Desktop/LogBrowser.app/Contents/MacOS/../Frameworks/NetSQExtensions.framework/Versions/A/NetSQExtensions
>> Expected in: /usr/lib/libobjc.A.dylib
>> in 
>> /Users/USER/Desktop/LogBrowser.app/Contents/MacOS/../Frameworks/NetSQExtensions.framework/Versions/A/NetSQExtensions
> 
> 
> I have used the following SDK & target settings for the frameworks and app
> 
> Framework settings:
> 
>       Base SDK: 10.7
>       OS X Deployment Target: OS X 10.7
> 
> 
> Cocoa Application:
> 
>       Base SDK: OS X 10.7
>       OS X Deployment Target: OS X 10.7
> 
> 
> I've also tried changing the Base SDK to 10.8, but I still get the same 
> problem.
> 
> Any ideas why application won't run on a 10.7 machine?  Why cannot it not 
> find _OBJC_CLASS_$_NSObject in /usr/lib/libobjc.A.dylib?

Most likely your Deployment Target setting is incorrect somewhere in 
NetSQExtensions.framework's build. 

Double-check your build settings; make sure the setting is correct for all of 
your targets and files. Look in your build transcripts and make sure you have 
`-mmacosx-version-min=10.7` everywhere; that flag must be present for each 
compile and link, and it must not be 10.8 for any of them. If you link any .a 
files into NetSQExtensions, make sure those .a files are also built with the 
correct deployment target.

(The underlying problem is that class NSObject moved from CoreFoundation to 
libobjc in 10.8. Setting Deployment Target = 10.7 means the compiler and linker 
add the appropriate backwards-compatibility glue so your code can find class 
NSObject in either location. If the deployment target is missing or too new 
anywhere then some of your code will look for NSObject in libobjc alone, and 
will fail on 10.7 because it's in CoreFoundation instead.)


-- 
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

Reply via email to