I'm trying to call a method implemented in Obj-C from C code as follows:
// MainViewController.m
- (void)Test
{
[self outputLine:@"Called from MyCode.c"];
}
.
.
.
cFunc(id param);
.
.
.
// MyCode.c
void cFunc(id param)
{
[param Test]; // compilation error: Parse issue: Expected expression
}
I guess it happens since the MainViewController is not declared in MyCode.c, but when I #include the MainViewController.h I get tons of other errors that suggests I'm totally wrong... How should I handle it correctly?
TIA