I'm trying to write my first custom Cocoa Framework, and I want to expose a simple C function from a framework that wraps a bunch of functionality like NSApplicationMain does. When I just imported the files directly from the project, everything went fine, the project was built, and my C function was called correctly.
Now I have a new Cocoa Framework project that contains files, I canβt create my program because I get "No characters found" error messages, especially for my C function.
I tried the function definition prefix in the header file using extern, but still nothing.
Can anyone give me a head? How can I expose standard C functions through a custom Cocoa Framework?
A rough idea of ββwhat I'm doing:
My program that uses my own framework:
#import <BDWebApplicationFramework/BDWebApplication.h> int main (int argc, const char * argv[]) { return BDWebApplicationMain(argc, (const char **)argv); }
My frame header: BDWebApplication.h
My framework file: BDWebApplication.m
#import "BDWebApplication.h" @implementation BDWebApplication @synthesize name; - (id)init { [super init]; name = @"New name"; return self; } - (void)dealloc { [name release]; [super dealloc]; } @end int BDWebApplicationMain(int argc, const char * argv[]) {
source share