I use C + + to write an algorithm stored in a cpp inside. Now I want. M file referenced in the C + + class in Objective-C, and call its class members, how they could not achieve?
Reply:
First. M file suffix rewrite. Mm file. Then you write with c + + # import came algorithm can be friends.
Reply:
Mm files currently used in the header file # import or # include introducing cpp compiler will complain that I remove it properly
Reply:
First: check the project settings "Apple LLVM compiler 3.1 - Language" section.
Second: whether to use some template class
Reply:
No change. Mm file, because that is. Mm file compiler was able to identify the c + + code.
Reply:
It must be included in the. Mm file, not included in the header file ah. Header files using @ class.
Reply:
Identified, a link error, syntax and prove no problem.
Reply:
Which specific settings?
Reply:
It did not work linker command failed with exit code 1 (use-v to see invocation)
Reply:
Reply:
If you have a c + + code, the compiler option was selected objective-c + +
No comments:
Post a Comment