Makefile .mm files


I have to use makefiles for a project (OF 0.81 master) and am using an addon with .mm source files. The project fails to compile with ‘make Release’ from terminal, but is fine from xcode ide. I think i have to change something in the config.make to force the .mm files to compile as c++ somehow, but I’m not really sure what or where?

On a side note, is there any documentation for how to use the OF makefiles on different platforms?


1 Like

Do you mean compile these files as Objective-C++, not C++? gcc and clang have a language flag for subsequent files:

$ clang -x objective-c++

How exactly that gets incorporate that into config.make, I don’t know. :confounded:

Thanks @pizthewiz. Yes I’m looking for pretty much exactly what you described but incorporated in the config.make.

Couldn’t figure this one out in time, ended up just renaming the .mm files to .cpp. I’m pretty sure it’s meant to be supported though, in the libs/openFrameworksCompiled/project/makefileCommon/ (line 280-283) all the flags seem to be set for using .mm files in the addons - it just doesn’t seem to work.

Unfortunately I don’t understand makefiles enough to know if it’s a bug or not. Thought i’d post here in case someone comes across it. I’ve attached a sample xcode project i’ve been testing with. (25.2 KB)