Re: Weak Linking Frameworks in Xcode 3.0
Re: Weak Linking Frameworks in Xcode 3.0
- Subject: Re: Weak Linking Frameworks in Xcode 3.0
- From: Chris Suter <email@hidden>
- Date: Wed, 5 Dec 2007 13:21:45 +1100
On 05/12/2007, at 6:13 AM, Nick Nallick wrote:
I have a project created with Xcode 2.x under Tiger that I've
upgraded to Xcode 3 in Leopard. It weak links a couple frameworks
to allow the app to launch on 10.3.9. This all worked fine when
built under Tiger. When I build with Xcode 3 under Leopard and
launch the app on 10.3.9 I get a number of dyld errors of the form:
undefined reference to .objQuartzCore
The app launches fine under Tiger and Leopard. I'm specifying the
weak link by adding statements like the following to the "Other
Linker Flags" build setting.
-weak_framework QuartzCore
How do I make this work with Xcode 3? FWIW, all of my errors seem
to occur when loading Obj-C elements of QuartzCore.
I've just reported a bug (or at least it seems like a bug to me) in
the Leopard linker that may be related to the cause of your problem
(rdar://5627651). My problem was that I found that after linking the
resulting linked object was expecting things like objc_msgSendSuper in
the wrong library. For me it was referencing objc_msgSendSuper in the
WebKit framework. (You can find out where the dynamic linker will look
for symbols by using "nm -m".) It doesn't seem to matter when running
on Tiger or Leopard but on 10.3 it would complain.
To workaround the problem I added libobjc to the list of libraries to
link against and that seems to fix the problem.
I'm not convinced it's related to your problem but it might be.
- Chris
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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