Re: Cross-development: "mismatching weak references"
Re: Cross-development: "mismatching weak references"
- Subject: Re: Cross-development: "mismatching weak references"
- From: Chris Espinosa <email@hidden>
- Date: Wed, 4 May 2005 09:48:10 -0700
On May 4, 2005, at 9:33 AM, David Catmull wrote: I'm trying to build an application that will run on 10.2, but using some 10.3 APIs if they're available (specifically the segment control). My target's cross-development SDK is set to "Current Mac OS", and my deployment target is set to 10.2. When I try to build, I get "mismatching weak references for symbol" errors for each HISegmentView call I use. What does this error mean, and how can I get around it?
I am making those calls from a static library that the application links to. Is there something I need to change in the way the library is built so that it also does weak linking? I've already tried the obvious step of setting the SDK and deployment target in the library project as well.
Make sure that both the library and the app are built using the 10.3 SDK with deployment target set to 10.2. What's happening is that when the linker is trying to link the library with the app, it notices that one is importing the 10.3 symbols weak but the other is not.
Also ensure that you're including AvailabilityMacros.h at compile time. This is at the top of <carbon/Carbon.h> so it's unlikely that you're missing it, but do just check.
You can use otool on the library and/or the app's .o files that refer to HISegmentView to see exactly how they are expecting to import the HISegmentView symbols. They must match.
Also, just root around in the sources and make sure you don't have your own private definitions of the HISegmentView APIs anywhere that you may be picking up. If they don't have the proper Availability Macro then they won't be marked weak.
Chris |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden