objective-c – SoundCloud API Apple Mach-O链接器(Id)错误

objective-c – SoundCloud API Apple Mach-O链接器(Id)错误,第1张

概述我正在尝试将 Cocoa SoundCloud API集成到我的iPhone / iPad应用程序中.我按照 here详细说明进行 *** 作,但是当我尝试构建并运行我的项目时,出现以下错误: Apple Mach-O链接器(Id)错误 Ld "/Users/curuser/Library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxak 我正在尝试将 Cocoa SoundCloud API集成到我的iPhone / iPad应用程序中.我按照 here详细说明进行 *** 作,但是当我尝试构建并运行我的项目时,出现以下错误:

Apple Mach-O链接器(ID)错误

Ld "/Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator/MyApp.app/MyApp" normal i386    cd "/Users/curuser/DropBox/iPhone Apps/MyApp"    setenv MACOSX_DEPLOYMENT_TARGET 10.6    setenv PATH "/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"    /Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator5.0.sdk -L/Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator -F/Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator -fileList "/Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Intermediates/MyApp.build/DeBUG-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.linkfileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -all_load -ObjC -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_required=30000 -framework UIKit /Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator/SoundCloudAPI/SoundCloudAPI -framework Security -framework oauth2client /Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator/libSoundCloudAPI.a -loauth2client -framework AudioToolBox -framework Foundation -o "/Users/curuser/library/Developer/Xcode/DerivedData/MyApp-gzdzxolteaojcobbqsfkgxakkclz/Build/Products/DeBUG-iphonesimulator/MyApp.app/MyApp"Command /Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin/clang Failed with exit code 1

我对iPhone开发很新,我无法弄清楚如何修复它.我的猜测是我错过了一个框架,但我添加了步骤#3中所述的框架:

>现在,Target需要了解它应链接的新库.因此,在项目中,选择Target,然后在Build Phases中转到link Binary with librarIEs部分.添加以下内容:

> libSoundCloudAPI.a(或桌面上的SoundCloudAPI.framework)
> liboauth2client.a(或桌面上的oauth2client.framework)
> Security.framework
> AudioToolBox.framework(如果你想要流媒体)

当我添加libSoundCloudAPI.a和liboauth2client.a时,它会显示为工作区中的缺失文件(带有虚线边框图标的红色).

解决方法 如果您不熟悉iOS开发,将SoundCloud集成到App中的最佳方法是使用新的 CocoaSoundCloudAPI.soundCloud不再支持您所指的那个.

要将其集成到您的项目中,您只需要以下几个步骤:

在终端

>转到项目目录.
>添加所需的GIT子模块

// For the APIgit submodule add git://github.com/nxtbgthng/oauth2client.gitgit submodule add git://github.com/soundcloud/CocoaSoundCloudAPI.gitgit submodule add git://github.com/nxtbgthng/JsONKit.gitgit submodule add git://github.com/nxtbgthng/OHAttributedLabel.gitgit submodule add git://github.com/soundcloud/CocoaSoundCloudUI.git

在Xcode中

>创建一个包含上面添加的所有子模块的工作区.
>为了能够找到标题,您仍需要将../**(或./**,具体取决于您的设置)添加到主项目的标题搜索路径中.
>现在,然后在Build Phases中转到link Binary with librarIEs部分.添加以下内容:

> libSoundCloudAPI.a
> liboauth2client.a
> libJsONKit.a
> libOHAttributedLabel.a
> libSoundCloudUI.a
> QuartzCore.framework
> AddressBook.framework
> AddressBookUI.framework
> CoreLocation.framework
> Security.framework
> CoreGraphics.framework
> CoreText.framework

>下一步是确保链接器找到所需的一切:所以转到项目的Build设置并将以下内容添加到Other linker Flags

-all_load -ObjC

>在iOS上我们需要一些图形:请将SoundCloud.bundle从CocoaSoundCloudUI /目录移动到您的资源.

总结

以上是内存溢出为你收集整理的objective-c – SoundCloud API Apple Mach-O链接器(Id)错误全部内容,希望文章能够帮你解决objective-c – SoundCloud API Apple Mach-O链接器(Id)错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1004127.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存