iOS的定位迷失在合并暂定定义 [英] iOS alignment lost in merging tentative definition

查看:142
本文介绍了iOS的定位迷失在合并暂定定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我存档我的iOS应用程序,我得到了以下错误:

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...

谢谢!

推荐答案

我只是碰到了同样的问题。我假设_isDragging和_isLoading是你声明的地方全局变量。如果是这样的话,一定要同时声明为的extern 在.h文件中正是如此:

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

MyFile.m

bool _isDragging = false;
bool _isLoading = false;`

希望这有助于!

Hope this helps!

这篇关于iOS的定位迷失在合并暂定定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆