Hello all!

I'm having problems with running c++ on iOS. I have a iOS openGL project in Xcode 4 and an external library written in c++ that has to be a dependency to the iOS target so it can run on an Ipad. right now I'm testing with the iPad simulator.

The problem is that i can't include stuff like iostream, string etc, and use them. Is there something i have missed? Does iOS not support C++ or parts of C++, like string and IO stuff? I can use some C++ functionality but many parts seems to be missing. I can run c++ code that i have written myself and parts some parts of the c++ library. I can't find any information about this anywhere. Seems to me that I'm missing something trivial.

Any suggestions?

Thanks!

If you're simply unable to find the header files, copy them to your project's folder, along with your other source files. That should do the trick.

Also, every implementation-file needs to have the .mm extension, unless it's purely a c++ file (.cpp). The compiler behaves REALLY strange if confronted with some .mm files, and some .m - often in the form of claiming certain files does not exist. This does also include pure ObjC files - .mm them all.

Yes i know about objective c++ etc. Thats why I was suprised when i didn't get c++ stuff working. I sorted it out though, it had something to do with compiler settings.