Import OBJ-C variable inside C class

109 Views Asked by At

i have an issue that i can't resolve. I have to use a variable declared in objective C file header, in my .c class. To do this i use this code in my .c file:

#ifdef __OBJC__
   #import "RilieviTableViewController.h"
#endif

But when i try to use the object, xcode says me "use of undeclared identifier semBtnPressed". In my obj C header file i declared that object in this way:

#import <UIKit/UIKit.h>
#include <AudioToolBox/AudioToolBox.h>
#include "starrec_pal_sema.h"

static id refToSelf;
static StarRec_PAL_Sema *semBtnPressed; // <-- variable i want to import.


@interface RilieviTableViewController : UITableViewController
// other variable that i don't have to import.
@end

This project use Nuance libraries and that object is a Nuance object. In the sample they simply import class in ifdef block, but in my case it doesn't work. Can everyone have a solution?

0

There are 0 best solutions below