iOS alignment lost in merging tentative definition

China☆狼群 提交于 2019-12-22 17:48:54

问题


when I archive my iOS app I get the following errors:

ld: warning: alignment lost in merging tentative definition _isDragging
ld: warning: alignment lost in merging tentative definition _isLoading

Could someone please tell me what's wrong and where should I look for...

Thanks!


回答1:


I just ran into this same issue. I'm assuming that _isDragging and _isLoading are global variables that you declared somewhere. If that is so, make sure you declare both as extern in your .h file thusly:

MyFile.h

extern bool _isDragging;
extern bool _isLoading;

MyFile.m

bool _isDragging = false;
bool _isLoading = false;`

Hope this helps!



来源:https://stackoverflow.com/questions/8743262/ios-alignment-lost-in-merging-tentative-definition

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