Raja S
Raja S

Reputation: 133

Adding 3rd party c++ library into objective C project

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

Answers (1)

Jaanus
Jaanus

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

Related Questions