Thanks! That's what I thought, 2010/5/31 Jens Alfke <j...@mooseyard.com>
> > On May 31, 2010, at 10:11 AM, Louis-Philippe wrote: > > > like, if I have a c++ lib I would like to call from within an Objective-c > > class, assuming a call like: > > I’m not sure what it is you’re trying to do. You can easily call C++ code > from Objective-C just by switching the compiler dialect to Objective-C++, > which is done most simply by changing your source file’s extension from .m > to .mm. > > If you’re trying to load a dylib dynamically and resolve symbols, use > dlopen etc. as Sherm said. To call those functions you’ll need to cast the > pointer to the appropriate type of function pointer and call it. > > If you’re looking for a general-purpose eval( ) function as found in > interpreted languages like PHP or Python, there isn’t one. Objective-C is > not an interpreted language, so the parsing and compilation is done at build > time by the compiler, not at runtime. > > —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com