Re: How to call functions of a C dylib on a C++ dylib
Re: How to call functions of a C dylib on a C++ dylib
- Subject: Re: How to call functions of a C dylib on a C++ dylib
- From: Stefan Werner <email@hidden>
- Date: Thu, 18 Sep 2008 09:01:55 -0700
On Sep 18, 2008, at 7:53 AM, Kiel Gillard wrote:
Howdy,
I think the following syntax is the right idea:
extern "C" { extern void MyFunction(void *args);
}
I'm not sure about the duplicate 'extern'. Here's what I use in my code:
extern "C" void MyFunction(void *args);
or you can also do
extern "C" {
#include "MyCHeader.h"
}
for entire header files.
Also, you can use 'nm -o libSomething.dylib' do inspect the function
signatures a certain lib exports.
-Stefan
_______________________________________________
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