When i declare a global variable, I get the error:
linker command failed with exit code 1 (use -v to see invocation)
Here is the code:
import "menuplay.h"
import "buttonmanager.h"
int test; //<--------------when i declare it show error Apple Mach-O Linker Error
@interface lessonone : CCLayer {
...
}
Declare it static:
static int test;
Or const if its value should never change:
const int test = 10;