试图通过cocoapods添加TheAmazingAudioEngine并惨遭失败

时间:2016-06-28 06:35:10

标签: xcode cocoapods

我创建了一个podfile:

source 'https://github.com/CocoaPods/Specs.git'

target :MyApp do
  pod 'TheAmazingAudioEngine'
end

运行pod设置,pod安装和pod更新...得到:

  

更新所有广告

     

更新本地规格存储库

     

分析依赖关系

     

下载依赖项

     

使用TheAmazingAudioEngine(1.5.1)

     

生成Pods项目

     

集成客户端项目

     

发送统计资料

     

Pod安装完成! Podfile有1个依赖项,1个   总安装了pod。

然后根据涉及同样错误的各种SOF帖子的所有建议/建议,我做了以下事情:

  • 确保我的项目/目标+ Pod之间的Build Active Architectures只相同

  • 将$(继承)添加到其他链接器标志的顶部

  • 将$(继承)添加到框架搜索路径

  • 在库搜索路径中添加了$(继承) (这显示了build / Debug-iphoneos / TheAmazingAudioEngine“

  • 将$(inherited)和COCOAPODS = 1添加到预处理器宏

  • 确保Link Binary With Libraries有libPods-MyApp.a

  • 删除了Pods文件夹,Podfile.lock和我的.xcworkspace文件,并执行了“pod install&& pod update”

  • 清理项目

...

基本上,无论我做什么,当我建立时,我总是得到:

Ld /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/myapp.app/myapp normal arm64
    cd /Users/patrick/MyApp
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos -L/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/TheAmazingAudioEngine -L/Users/patrick/MyApp/build/Debug-iphoneos -F/Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos -filelist /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/myapp.LinkFileList -miphoneos-version-min=6.0 -dead_strip -fembed-bitcode-marker -ObjC -ObjC -lTheAmazingAudioEngine -framework Accelerate -framework AudioToolbox -ObjC -lz -fobjc-arc -fobjc-link-runtime -lPods-MyApp -framework CoreMIDI -framework Security -framework CoreData -framework StoreKit /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libCocosDenshion.a -framework Accelerate -framework CoreLocation /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libkazmath.a -framework CoreMotion -framework CoreText -framework AudioToolbox -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -framework GameKit /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/libcocos2d.a -Xlinker -dependency_info -Xlinker /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/myapp_dependency_info.dat -o /Users/patrick/Library/Developer/Xcode/DerivedData/MyApp-hjfppqmgxqrprucknvwtakynpqxs/Build/Products/Debug-iphoneos/myapp.app/myapp

ld: warning: directory not found for option '-L/Users/patrick/MyApp/build/Debug-iphoneos'
ld: library not found for -lTheAmazingAudioEngine
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:0)

1)转到Build Settings

2)选择Other Linker Flags

3)添加-l" TheAmazingAudioEngine"

4)重建

试试吧