當我聲明一個全局變量,我得到的錯誤:鏈接器命令失敗int變量
linker command failed with exit code 1 (use -v to see invocation)
下面是代碼:
import "menuplay.h"
import "buttonmanager.h"
int test; //<--------------when i declare it show error Apple Mach-O Linker Error
@interface lessonone : CCLayer {
...
}
請勿在目標C中使用全局變量: - – Guru 2013-03-16 16:27:13