Re: Importing framework include files
Re: Importing framework include files
- Subject: Re: Importing framework include files
- From: "R.L. Grigg" <email@hidden>
- Date: Thu, 15 May 2008 21:33:12 -0700
On May 15, 2008, at 8:58 PM, Chris Hanson wrote:
On May 14, 2008, at 12:01 PM, R.L. Grigg wrote:
In a Cocoa project (OSX 10.5.2, Xcode 3.0) when I add a framework
from /Library/Frameworks into the project "Linked Frameworks" group
how do I then reference one of the frameworks include files from my
code?
The "Linked Frameworks" group in the Groups & Files list is just a
group, for organizational purposes. There's nothing particularly
special about it.
You need to ensure your framework is actually linked by your
target. You can do this by making it a member of your target: Just
Get Info on the framework within Xcode, switch to the Targets tab,
and click the checkbox next to the target that's going to use the
framework.
Yes, my framework already had the checkbox next to it clicked (with a
checkmark in blue) for my target. I didnt check it, it was already
checked. BTW, this is a vanilla build. I havent modified any of the
project settings from their defaults.
My project is "NetHub" and I use a framework called "NetHubPorts".
Here is the compile:
In the compile command, there should have been a pair of arguments
like this:
-framework NetHubPorts
These are passed to the compiler to indicate that your project links
against the NetHubPorts framework.
The string "-framework" doesn't appear anywhere in the build log. It
stops at the point where it can't find the framework include file I
reference, shown in my previous posting. If I manually add (w/o copy)
the framework include file to my project, it does find it with #import
"NHPPort.h" and not "#import <NetHubPorts/NHPPort.h>", as expected,
and it builds and runs. But I'm not supposed to have to do it that
way, right?
Thx,
Russ
_______________________________________________
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