问题
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