Q:

Passing Objective-C method to c++ method

I created void type method in Objective-C to pass it to C++ method shown below:
C++ method to which Objectiv-C method will be passed:
glfwSetWindowSizeCallback(m_Window, windowResize);

Here is Objective-C method:
- (void) windowResize:(GLFWwindow *)window :(int)width :(int)height {glViewport(0, 0, width, height);}

I know it can be solved by adding C++ file to the project and linking it to .m file with C++ method, but i would like to implement it in Cocoa syntax

A:

ObjC methods can be passed arround as selectors like 
SEL method = @selector(windowResize:width:height:);
glfwSetWindowSizeCallback(m_Window, method);

Then applied inside glfwSetWindowSizeCallback. Alternately you could wrap the ObjC call in a c function and pass the function pointer.
A more complete example might be:
void func(NSApplication * target, SEL method) {
    if ([target respondsToSelector: method] ) {
       [target performSelector:method];
    }
}

elsewhere:
- (void)applicationWillTerminate:(NSNotification *)aNotification {
    SEL method = @selector(unhideAllApplications:);
    func([NSApplication sharedApplication] , method);
  }

