Re: Linking C++ and Objective-C files
Re: Linking C++ and Objective-C files
- Subject: Re: Linking C++ and Objective-C files
- From: Jens Ayton <email@hidden>
- Date: Fri, 24 Jul 2009 10:19:49 +0200
On Jul 24, 2009, at 09:58, Andreas Menzi wrote:
Hi all,
I have a problem linking an m-file in my project which is a C++
bundle. I tried to include the m-file from the following code sample
in my project:
As with C, Objective-C functions used from C++ must be declared extern
"C". In the appropriate header, you need something like this:
#if __cplusplus
extern "C" {
#endif
whateverTheReturnTypeIs CreateCocoaCursor(CGImage*, float, float);
#if __cplusplus
}
#endif
--
Jens Ayton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden