Unterminated conditional directive in Xcode

Andrey Chernukha picture Andrey Chernukha · Jan 16, 2012 · Viewed 22.9k times · Source

What's wrong here:

#define CONTROLS_OFFSET 100
#ifdef  CONTROLS_OFFSET//Unterminated conditional directive it says
#define FIND_MAIN_MENU 3

Why do i get this error?

Answer

Noah Witherspoon picture Noah Witherspoon · Jan 16, 2012

An #ifdef, like an #if, needs to be balanced by an #endif. In this case, that would probably go immediately after your #define line.