After I upgraded to El Capitan and Xcode 7, I cannot build my app. I keep getting duplicate symbols on all of my global variables. Please help.
//Global.h
#ifndef Global_h
#define Global_h
extern NSInteger pickerConstantOne, pickerConstantTwo,numberOfDays, monthOfToday;
NSInteger pickerConstantOne, pickerConstantTwo,numberOfDays, monthOfToday;
#endif /* Global_h */
You have misdeclared those variables; remove this statement from the header:
NSInteger pickerConstantOne, pickerConstantTwo,numberOfDays, monthOfToday;
and move it into a .m
file.
You should also review exactly why you are using global variables in the first place as you certainly don't need to be.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.