Re: Methods calling C functions
Re: Methods calling C functions
- Subject: Re: Methods calling C functions
- From: Ondra Cada <email@hidden>
- Date: Mon, 20 Jun 2005 20:17:58 +0200
Lee,
On Jun 20, 2005, at 5:44 AM, Lee Morgan wrote:
I know C can be mixed with Obj-C easily.
However I have a few connivence functions that I keep in a .c file
that I would like to expose to my entire project (like NSLog is).
I was told that I have to expose the functions using Obj-C mangling
however I can't seem to find any information on how to do this.
Does anyone know of a easy way to do this, or can point me to some
docs that explain how?
Don't trust the one who told you so :)
There is no ObjC name-mangling at all (luckily!). Just do it, and it
would work all right. A function in .m is completely equivalent a
function in .c. Just ensure the functions are exported (in both .c
and .m it means "are not declared static") and that the module with
the definitions gets linked in (sufficient dynamically), and it Just
Works.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden