我刚刚将我的 xCode 更新到最新版本,并且我已经下载了示例项目,您可以从制作 Estimote iBeacons 的人那里获得。但是,当我尝试构建他们的示例项目时,我收到以下错误:
(null): Directory not found for option '-L"/Users/com/Desktop/iOS-SDK-master/NotificationDemo/../../../../../../Library/Developer/Xcode/DerivedData/EstimoteBLE-fciknfmtjexyisdvrlnpfgdjgsck/Build/Products/Debug-iphoneos"'
(null): Directory not found for option '-L"/Users/soluis27mac/Desktop/iOS-SDK-master/NotificationDemo/../SDK"'
(null): Directory not found for option '-L/Users/Gacek/Documents/Programowanie/iOS/Estimote/publicEstimoteSDK/iOS-SDK/SDK'
(null): Library not found for -lEstimoteBLE
(null): Linker command failed with exit code 1 (use -v to see invocation)
我已经用谷歌搜索了这个,很多似乎告诉我我需要对我的构建选项做一些事情。但是,我尝试过的所有事情( like this website for example )仍然会导致相同的错误。
我只是尝试创建一个新项目并按照他们提供的安装说明重新编写代码。但是,这会导致更多错误,例如:
(null): Ignoring file /Users/comp/Desktop/iOS-SDK-master/SDK/libEstimoteBLE.a, missing required architecture i386 in file /Users/comp/Desktop/iOS-SDK-master/SDK/libEstimoteBLE.a (2 slices)
(null): "_OBJC_CLASS_$_BeaconManager", referenced from:
(null): Objc-class-ref in ViewController.o
(null): Symbol(s) not found for architecture i386
(null): Linker command failed with exit code 1 (use -v to see invocation)
我知道在从 Internet 下载示例项目时,这可能是一个相当普遍的问题,但是任何人都可以就我可以尝试解决这个错误的方法提供一些其他建议。我对 iOS 开发和 xCode 的世界还很陌生。
最佳答案
缺少所需的架构 i386 意味着该库不是为模拟器构建的,即 i386 架构。您还需要要求库的所有者提供模拟器构建的 .a 文件。在此之前,您可以为 iOS 设备构建代码并检查是否构建。
希望有帮助!
关于iphone - 链接器命令失败 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18914938/