Re: Link issue??
Re: Link issue??
- Subject: Re: Link issue??
- From: Fritz Anderson <email@hidden>
- Date: Mon, 27 Jul 2009 14:56:42 -0500
On 27 Jul 2009, at 1:44 PM, Michael de Haan wrote:
It seems that one not only has one to #import ( as in this case
#import CoreData/CoreData.h) BUT one also has to link to the
CoreData framework. So, excuse for asking something which might
appear quite basic, does not the first action ie the #import action,
take care of the second ie why does one need both.
Compiling a source file (in which you must tell the compiler where to
find the language-level specification of a framework) is a different
thing from linking an application (in which you must tell the linker
where to find the code that runs in the framework). Two different tasks.
The compiler does not know, from #import <CoreData/CoreData.h>, that
Core Data is a framework (it doesn't know about frameworks at all),
and there are several Core Data frameworks on your development
machine, depending on the SDK or platform you're using. Even if the
compiler had a way to communicate it to the linker, it would not be
enough information to identify the framework.
One could imagine a suite of development tools that inferred the
existence and location of a library from the presence of an #import
somewhere in your source, but that isn't Xcode, and it isn't the GCC
tool chain.
— F
--
Fritz Anderson -- Xcode 3 Unleashed: Now in its second printing -- <http://x3u.manoverboard.org/
>
_______________________________________________
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