Objective c self variable

Hi there,
I’m currently mixing c++ with objective c. As for now i have tested my Code with xcode objective c only but when mixing I cannot use the ‘self’ variable to call my Methods. All these lines are in one c++ file (whcih should be compiled as an mm in the end. I’m remote buidling and this is the error I get when calling my onjective c method)

C:\Program Files\Epic Games\UE_4.18(312,3): error: use of undeclared identifier ‘self’
UATHelper: Packaging (iOS):
UATHelper: Packaging (iOS): [self Sharebutton];

code:

void Aaccessactorios::Shareoption() {
#if PLATFORM_IOS

[self Sharebutton];

#endif
}

I’ve added These lines within a IF_PLATFORM_IOS preprocessor tag:

  • (instancetype)init
    {
    self = [super init];
    if (self) {

      return self;
    

    }
    return self;
    }

why do I always get the undeclared identifier error? How can I overcome this issue?
Thanks