• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Calling a Cocoa library from C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling a Cocoa library from C


  • Subject: Calling a Cocoa library from C
  • From: Nathan Sims <email@hidden>
  • Date: Fri, 11 Nov 2011 17:49:35 -0800

Newb question. I need to create an OS X Cocoa library that is going to be called from a C program. The C program's interface will be simple, along the lines of:

   retval=get_float_data(&float1,&float2);

where get_float_data() is a function that resides in the Cocoa library and invokes Objc code to generate and return two float values to the caller.

I'm unclear on how to architect this. Can a C function invoke Objc methods?
(OSX 10.6.8, Xcode 3.2.6)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Calling a Cocoa library from C
      • From: lbland <email@hidden>
    • Re: Calling a Cocoa library from C
      • From: Wim Lewis <email@hidden>
    • Re: Calling a Cocoa library from C
      • From: Greg Parker <email@hidden>
    • Re: Calling a Cocoa library from C
      • From: Dave DeLong <email@hidden>
  • Prev by Date: Re: NSDateFormatter -initWithDateFormat:: vs. -init
  • Next by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Previous by thread: Re: NSDateFormatter -initWithDateFormat:: vs. -init
  • Next by thread: Re: Calling a Cocoa library from C
  • Index(es):
    • Date
    • Thread