The error means that the compiler has not yet encountered the #define when you try to use it. So make sure the #define comes before the place where you use it. Take a look at the order in which you #include files.