If you implement your method, as shown below in the .mm file, there will be duplicate symbol error.
#import <Foundation/Foundation.h>
class CppTestOne
{
public:
void Test();
};
void CppTestOne::Test()
{
NSLog(@"Hello C Plus Plus");
}
then you can implement your method
#import <Foundation/Foundation.h>
class CppTestOne
{
public:
void Test()
{
NSLog(@"Hello C Plus Plus");
}
};
more information about this error is fuzzy
source
share