Mach-o Linker Error

亡梦爱人 提交于 2019-12-02 04:04:40

I had faced the same issue someday and figured out the result as:

Here You have a int tagShit of constant type. So you can not make constant type variables of same name in two or more classes. Change that tagShit variable name in one of the class (may be as tagShift1 or anything else) and it will be good to go.

Hope it'll help you.

I guess you have included TrafficLightG.h in more than one file.

#include "TrafficLightG.h"

Declare your const in that way:

TrafficLightG.h

const int tagShift;

TrafficLightG.m

 const int tagShift = 90;

PS: use NSInteger or NSUInteger instead of int.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!