C Language: what does the .mm extension stand for?

objective-c, objective-c++

Solution

The extension `.mm` is the extension for the `C++` compilation unit expected by the Objective-C compiler, while the `.m` extension is the extension for the `C` compilation unit expected by the Objective-C compiler.

That's assuming you don't use a compiler flag to override the file extension, as this gentleman has done.

Problem

A project with some Objective-C has a few C classes with the implementation files having a .mm extension. ``` file.h file.mm ``` What does the .mm mean? Shouldn't it just be .m?

Original source

Related problems