Reputation: 133
I have 3rd party static library.. It contains only (.h and .hpp) header files.. They are in C++ language.. But my project was in objective C. Can i use these libraries in my project and is it possible to call the c++ functions in my objective c project.. ???
Upvotes: 0
Views: 127
Reputation: 17866
Yes, you can do that. C++ is fully supported in Objective-C. Just rename the relevant Objective-C implementation files from .m
to .mm
, and they start to be compiled as C++ now, instead of “plain C mode.” These .mm files can directly call your C++ code.
Upvotes: 1