Reputation: 2810
got a file named GeneralUtils.m and its header file. Im using that as a shared methods in several IOS projects.
Question: some of projects are compiling success. but one of project throws error at compile time:than I'm changing m file extension to mm file. and it compiles.but by the way;other projects does not compile and renaming again mm extension to "m" back again.
I want to understand the logic. why some of my IOS project wants its extension as m and other one wants it as mm file extension
Error details :
Undefined symbols for architecture armv7:
"randIntBetween(int, int)", referenced from:
-[Blah method1] in File1.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Upvotes: 1
Views: 9192
Reputation: 11051
The extension .m means that it is Objective-C and the extension .mm means that it is Objective-C++. So those are different files and you should know what is in it.
Upvotes: 9