• 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
Re: Wrapping C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrapping C


  • Subject: Re: Wrapping C
  • From: Brent Gulanowski <email@hidden>
  • Date: Fri, 11 Oct 2002 13:22:24 -0400

On Thursday, October 10, 2002, at 05:00 PM, Cameron Hayne wrote:


On 10/10/02 12:21 pm, "Steve Ivy" <email@hidden> wrote:
I'm looking for something that
will help me create an Obc-C wrapper for a large-ish C library.
Ideally, it would be something like SWIG (http://www.swig.org/exec.html
- motto: "We are building a wrapper generator of extraordinary
magnitude.") but I'm not picky.

I'm not sure what you are looking for. As far as I can see, the point of
SWIG was to make C/C++ functions callable from a scripting language. But C
functions are already callable from Obj-C since Obj-C is a superset of C.
And in fact, the language is often referred to as Obj-C++ since you also can
mix in C++ code freely. What you can't do is map C++ classes onto Obj-C
classes. See the http://Cocoa.mamasam.com archives for recent discussions
about this latter issue.

Wouldn't wrapper suitability depend on the design of the C library? Some are OO-ish already to some extent, and may use ADTs, hidden structure members and the like and functions to manage them. If structures are accessed willy-nilly by any function that wants to, then I'd say, no, that would not be fun/easy/useful to try to put a wrapper around. But I've never done it either way :-).
--
Brent Gulanowski email@hidden

"We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true." -- Robert Wilensky
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Wrapping C (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: Toronto cocoa programmers?
  • Next by Date: Re: Toronto cocoa programmers?
  • Previous by thread: Re: Wrapping C
  • Next by thread: ld: undefined symbols
  • Index(es):
    • Date
    • Thread