Can somebody point me in the right direction for this. I’ve found lots of info on using c++ in obj c but not the other way around. I am making an iPhone game in c++ but need to tap into some of the features the iPhone has to offer.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s actually no difference between “using C++ in Objective-C” and “using Objective-C in C++” – they’re both actually using Objective-C++ (which is a distinct language).
Just make sure that you’re compiling the source file as Objective-C++: either rename it with a
.mmextension, or add the compiler flag-x objective-c++to affect all of your source files.Then you can do just about anything that you would do in Objective-C.