Stumped: How to call a function defined in a Framework?
Stumped: How to call a function defined in a Framework?
- Subject: Stumped: How to call a function defined in a Framework?
- From: JK <email@hidden>
- Date: Thu, 4 Dec 2008 23:38:32 -0800
Hello fellow X-Code users,
I'm having a problem calling a function in a Framework; the compiler
complains about an undeclared type. I must be doing something wrong,
but I have no idea what...
Here are the steps to repeat the problem:
1. Start XCode 3.1.2 (I am running Leopard 10.5.5)
2. Create a new Cocoa Document-Based application project.
3. In the file "MyDocument.m", add the line "SecuritySessionId
mySession;" to the "init" method, so that it looks like:
- (id)init
{
SecuritySessionId mySession;
self = [super init];
if (self) {
// Add your subclass-specific initialization here.
// If an error occurs here, send a [self release] message and
return nil.
}
return self;
}
4. Also in "MyDocument.m", add the line "#import <Security/
Security.h>" immediately after the line "#import "MyDocument.h"".
5. Add the "Security.framework" to the "Other Frameworks" folder in
the "Groups & Files" list in the project window.
6. Build the project.
The compiler complains with the following message:
error: 'SecuritySessionId' undeclared (first use in this function)
My question: What else is necessary to make this compile correctly?
I have never been able to build a project that references functions in
Frameworks that are not included in the default project.
Thanks in advance for any help you can provide,
JK
_______________________________________________
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