安全地解决 dylib 警告? [英] Safely resolve dylib warning?

查看:42
本文介绍了安全地解决 dylib 警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 给了我这个警告:

Xcode is giving me this warning:

ld:警告:重复的 dylib/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.host.dylib

ld: warning: duplicate dylib /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.host.dylib

这里有一个SO答案:xcode 中的重复 dylib 警告

表示查找并删除重复项.使用 locate 我看到 2 个文件:

which says to find and delete the duplicate. Using locate I see 2 files:

找到 libSystem.host.dylib

locate libSystem.host.dylib

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/lib/system/libSystem.host.dylib

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/lib/system/libSystem.host.dylib

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.host.dylib

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.host.dylib

所以,问题是 - 我如何安全地解决重复的 dylib 警告:

So, the question is - how do I safely resolve the duplicate dylib warning:

  • 我是否应该删除 3.2 dylib,如果是这样,当我为 iPad 编译时是否会导致问题?
  • 还是我应该删除整个 iPhoneSimulator3.2.sdk,如果是这样,是否意味着我丢失了 iPad 模拟器?
  • 或者我应该做些什么?

推荐答案

我也有这两个文件,但没有这样的警告.

I have both files too and no such warning.

从您链接的答案中,我会说这意味着您应该检查您的项目并删除对那里文件的重复引用.

And from the answer you've linked I would say this means you should check your project and delete the duplicate reference to the file there.

当您删除物理文件时,您的duplicate dylib"警告很可能会变成file not found"错误.

When you delete the physical file most likely your "duplicate dylib" warning will turn into a "file not found" error.

作为一般规则:当您必须更改 /Developer 中的某些内容或在您的用户目录之外进行更改时,您很可能做错了.

As a general rule: when you have to change something in /Developer or lets say outside of your user directory there is a high chance that you are doing something wrong.

总结:不,从 SDK 中删除任意文件是不安全的.

Summary: No, it's not safe to delete arbitrary files from the SDK.

这篇关于安全地解决 dylib 警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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