【发布时间】:2018-09-05 13:12:55
【问题描述】:
我正在尝试编译一个名为 Partita 的开源 iOS 应用程序,该项目似乎已经死了两年,而且看起来某些东西的更新破坏了一两件事。
这是我到目前为止所做的(我可能忘记了一个步骤)
其中一个依赖项(音频套件)是用旧的 swift 版本编译的,所以我采用了最新的源代码并编译了一个全新的框架并替换了 pod 给我的旧框架
添加了“尝试?”在一个给我“函数抛出但没有捕获”错误的函数之前
也许一两次调整
在某些时候,我必须编译才能在我的 iPhone 上发送,通用或虚拟设备返回更多错误,说 AudioKit 不可用,找不到声明等。但如果我为真实设备编译它就很好
现在我遇到了链接错误,他们在这里
Ld /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork normal arm64
cd "/Users/pierrick/Documents/Documents - MacBook Pro de Pierrick/Programming/Partita/Pods"
export IPHONEOS_DEPLOYMENT_TARGET=9.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 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Products/Debug-iphoneos/TuningFork -F/Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Products/Debug-iphoneos/TuningFork -F/Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Products/Debug-iphoneos/Chronos-Swift -F/Users/pierrick/Documents/Documents\ -\ MacBook\ Pro\ de\ Pierrick/Programming/Partita/Pods/AudioKit/iOS -filelist /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork.LinkFileList -install_name @rpath/TuningFork.framework/TuningFork -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork.swiftmodule -framework AVFoundation -framework AudioKit -framework Chronos -framework AudioKit -framework Chronos -framework Foundation -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork_dependency_info.dat -o /Users/pierrick/Library/Developer/Xcode/DerivedData/Partita-doeawmfadbgytvfskorsvxjyuroj/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TuningFork.build/Objects-normal/arm64/TuningFork
Undefined symbols for architecture arm64:
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
-[AKOperationGeneratorAudioUnit addCustomUgen:] in AudioKit(AKOperationGeneratorAudioUnit.o)
"operator new(unsigned long)", referenced from:
_createBoosterDSP in AudioKit(AKBooster-7854F601498F0658.o)
-[AKOperationGeneratorAudioUnit addCustomUgen:] in AudioKit(AKOperationGeneratorAudioUnit.o)
"vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
typeinfo for AKFrequencyTrackerDSPKernel in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKTesterDSPKernel in AudioKit(AKTesterAudioUnit.o)
typeinfo for AKOperationGeneratorDSPKernel in AudioKit(AKOperationGeneratorAudioUnit.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for __cxxabiv1::__class_type_info", referenced from:
typeinfo for DSPKernel in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKOutputBuffered in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKDSPBase in AudioKit(AKBooster-7854F601498F0658.o)
typeinfo for AKParameterRampBase in AudioKit(AKBooster-7854F601498F0658.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"___cxa_begin_catch", referenced from:
___clang_call_terminate in AudioKit(AKFrequencyTrackerAudioUnit.o)
"vtable for __cxxabiv1::__si_class_type_info", referenced from:
typeinfo for AKDSPKernel in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKSoundpipeKernel in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKBuffered in AudioKit(AKFrequencyTrackerAudioUnit.o)
typeinfo for AKBoosterDSP in AudioKit(AKBooster-7854F601498F0658.o)
typeinfo for AKExponentialParameterRamp in AudioKit(AKBooster-7854F601498F0658.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"___cxa_pure_virtual", referenced from:
vtable for AKSoundpipeKernel in AudioKit(AKFrequencyTrackerAudioUnit.o)
vtable for AKDSPKernel in AudioKit(AKDSPKernel.o)
vtable for AKSoundpipeKernel in AudioKit(AKOperationGeneratorAudioUnit.o)
"operator delete(void*)", referenced from:
AKFrequencyTrackerDSPKernel::~AKFrequencyTrackerDSPKernel() in AudioKit(AKFrequencyTrackerAudioUnit.o)
AKTesterDSPKernel::~AKTesterDSPKernel() in AudioKit(AKTesterAudioUnit.o)
-[AKOperationGeneratorAudioUnit addCustomUgen:] in AudioKit(AKOperationGeneratorAudioUnit.o)
-[AKOperationGeneratorAudioUnit .cxx_destruct] in AudioKit(AKOperationGeneratorAudioUnit.o)
AKOperationGeneratorDSPKernel::~AKOperationGeneratorDSPKernel() in AudioKit(AKOperationGeneratorAudioUnit.o)
AKOperationGeneratorDSPKernel::~AKOperationGeneratorDSPKernel() in AudioKit(AKOperationGeneratorAudioUnit.o)
"std::terminate()", referenced from:
___clang_call_terminate in AudioKit(AKFrequencyTrackerAudioUnit.o)
"___gxx_personality_v0", referenced from:
-[AKFrequencyTrackerAudioUnit createParameters] in AudioKit(AKFrequencyTrackerAudioUnit.o)
BufferedAudioBus::init(AVAudioFormat*, unsigned int) in AudioKit(AKFrequencyTrackerAudioUnit.o)
-[AKFrequencyTrackerAudioUnit allocateRenderResourcesAndReturnError:] in AudioKit(AKFrequencyTrackerAudioUnit.o)
BufferedAudioBus::allocateRenderResources(unsigned int) in AudioKit(AKFrequencyTrackerAudioUnit.o)
___50-[AKFrequencyTrackerAudioUnit internalRenderBlock]_block_invoke in AudioKit(AKFrequencyTrackerAudioUnit.o)
-[AKFrequencyTrackerAudioUnit .cxx_destruct] in AudioKit(AKFrequencyTrackerAudioUnit.o)
AKFrequencyTrackerDSPKernel::~AKFrequencyTrackerDSPKernel() in AudioKit(AKFrequencyTrackerAudioUnit.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
错误似乎完全来自 AudioKit(我必须重新编译的框架),所以也许我必须更改一两个设置才能使其正常工作,老实说,我在这里迷路了!我刚刚迁移到 Mac 生态系统,我对项目结构和 Xcode 整体了解不多
https://github.com/comyar/Partita 这是我正在尝试编译的代码,以防它有用
提前感谢您的帮助
【问题讨论】:
-
删除并添加您的第三方库可能会解决您的问题
-
你是在正确的方式。使用 CocoaPods 下载 AudioKit 时会出现一些问题。从 Pods 项目中删除 AudioKit.framework 并下载最新版本:github.com/AudioKit/AudioKit/releases。然后在 Partita 应用程序中导入 AudioKit.framework 并尝试运行该应用程序。
-
@teja_D 第三方库是 AudioKit 吗?或所有豆荚。我手动更新了 AudioKit,也许我在更改框架文件时错过了一步,也许我不得不更改项目中的一些设置,我将它添加到“链接库和框架”中,但就是这样
-
@SDW 这实际上是我已经做过的,我重新编译了 AudioKit 4.1,虽然我成功编译了它,但也许我省略了在编译之前应该完成的某些设置,因此框架正在使用 Partita 我也是由于 swift 版本不匹配,没有使用预编译的框架,我想如果我自己编译所有东西,我会再遇到这个问题,它有效,但可能是我造成了当前的问题,因为我不知道如何正确编译框架跨度>
标签: ios swift xcode open-source