Re: Library Include Questions
Re: Library Include Questions
- Subject: Re: Library Include Questions
- From: Fritz Anderson <email@hidden>
- Date: Tue, 24 Sep 2013 09:22:24 -0500
On 20 Sep 2013, at 7:03 PM, Roland King <email@hidden> wrote:
> On 21 Sep, 2013, at 12:42 am, Fritz Anderson <email@hidden> wrote:
>
>> By the way, going the other way: The clang in Xcode 5 implements modules and enables them by default in new projects (CLANG_ENABLE_MODULES). http://clang.llvm.org/docs/Modules.html says the feature is experimental, but there it is. The upshot is that if you #import <CoreImage/CoreImage.h>, clang will automatically add CoreImage.framework to the link phase. Don't rely on this if you share the project with someone using an earlier version of the compiler. I don't know whether the #imports in UIColor and UIImage are sufficient.
> You can opt in on older projects by setting Enable Modules and Link Frameworks Automatically in the build settings. To really use modules in the way they were intended you should I believe use @import, so in this case it would be @import CoreImage;, I think. The compatibility flags are handy but as modules become more widely used, the real syntax adds some extra options (like importing just a few classes)
I had understood @import (mentioned as an "import" keyword in the clang.llvm.org doc) was merely proposed, but not implemented. Of course, it's a fairly old document (only at the proposal stage), so I'm probably behind the times.
— F
_______________________________________________
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