I have a C++ library (.h only) that contains the implementation of a data structure and I'd like to use it in my iPhone app.
Firstly, I wrote a wrapper in objective-C++ as a class that, through composition, has an ivar of the C++ class. I then was 'obliged' to change the wrapper class extension to .mm
, and it seemed fine. But then I have to include this wrapped class file into several other files, so I have to change their extension too (in order to prevent a wave of compile-time errors).
Am I correct? Is there a way to 'confine' the .mm extension to just few files?(and so preventing name clashes etc)
EDIT: Some more info that might help, I'm using LLVM 1.5 as the compiler (I noticed that the number of compile time errors varies from GCC 4.2 to LLVM 1.5 but I'm not sure that it means much, since I didn't have a look at them all)