Q:

#define in header files in Objective-C

I have a Global.h that looks like

#define NUMBERX 21

In AppDelegate.h I include the Global.h file. In the AppDelegate.m I include the AppDelegate.h file. But in the AppDelegate.m I can't access the NUMBERX variable.

ERROR: Use of undeclared indentifier 'NUMBERX'.

If I define NUMBERX in AppDelegate.h than it works, but I want include only the header file (Global.h) in all other header files where I want to use the NUMBERX variable.
How can I solve that?

A:

If you're using objective-c standard #import to include your header file, try replacing it with a "c" #include.

