Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 988319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:37:16+00:00 2026-05-16T05:37:16+00:00

I’m attempting to write my first custom Cocoa Framework and I want to expose

  • 0

I’m attempting to write my first custom Cocoa Framework and I want to expose a simple C function from the framework that wraps up a bunch of functionality, much like NSApplicationMain does. When I simply imported the files directly from within the project, everything went fine, the project built and my C function was called correctly.

Now I have a new Cocoa Framework project which contains the files, I cant build my program because I get “Symbols not found” error messages, specifically for my C function.

I’ve tried prefixing the function definition in the header file with extern, but still nothing.

Can anyone give me a heads up? How can I expose standard C functions via custom Cocoa Framework?

Rough idea of what I’m doing:

My Program that uses my custom framework:

#import <BDWebApplicationFramework/BDWebApplication.h>

int main (int argc, const char * argv[]) {
    return BDWebApplicationMain(argc, (const char **)argv);
}

My framework header: BDWebApplication.h

#import <Foundation/Foundation.h>

@interface BDWebApplication : NSObject {
    NSString *name;
}
@property (readwrite, copy) NSString *name;

@end

extern int BDWebApplicationMain(int argc, const char * argv[]);

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[])
{
   // Do some Obj-c stuff here
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:37:17+00:00Added an answer on May 16, 2026 at 5:37 am

    The problem here is almost certainly buried within your Xcode build settings, not in the code you’ve posted (which looks fine).

    First things first: Are you linking to your new framework? Assuming you are, are you sure you’re actually exporting the symbols you think you are when you build the framework? (There are a number of options for specifying this, and some of them have semantics than can surprise the unwary.)

    What would be more useful in helping you diagnose this is the full text of the Xcode build transcripts for both the framework and the executable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.