我尝试了很多库来在本机应用程序中建立统一性。他们大多数已经过时了。在这里,我尝试了youtube(https://www.youtube.com/watch?v=D7YxPf6a32g)中的教程,但出现了铛错误。无法修复..
Ld /Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Products/Debug-iphoneos/UnityNative.app/UnityNative normal arm64 (in target: UnityNative)
cd /Users/riverswave4apple/Desktop/UnityNative
export IPHONEOS_DEPLOYMENT_TARGET=12.1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Products/Debug-iphoneos -L/Users/riverswave4apple/Desktop/UnityNative/../CubeTestBuild -L/Users/riverswave4apple/Desktop/UnityNative/../CubeTestBuild/Libraries -F/Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Products/Debug-iphoneos -filelist /Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Intermediates.noindex/UnityNative.build/Debug-iphoneos/UnityNative.build/Objects-normal/arm64/UnityNative.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=12.1 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Intermediates.noindex/UnityNative.build/Debug-iphoneos/UnityNative.build/Objects-normal/arm64/UnityNative_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -weak_framework iAd -liconv.2 -framework UIKit -framework SystemConfiguration -framework QuartzCore -framework OpenGLES -framework OpenAL -framework MediaPlayer -framework Foundation -framework CoreVideo -framework CoreMotion -framework CoreMedia -framework CoreGraphics -framework CoreLocation -framework CFNetwork -framework AVFoundation -framework AudioToolbox -framework CoreText -weak-liPhone-lib -lil2cpp -Xlinker -dependency_info -Xlinker /Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Intermediates.noindex/UnityNative.build/Debug-iphoneos/UnityNative.build/Objects-normal/arm64/UnityNative_dependency_info.dat -o /Users/riverswave4apple/Library/Developer/Xcode/DerivedData/UnityNative-dtzfqcybbuktpadpmmqrlhoorkgi/Build/Products/Debug-iphoneos/UnityNative.app/UnityNative
Undefined symbols for architecture arm64:
"_MTAudioProcessingTapGetSourceAudio", referenced from:
AVFoundationVideoPlayback::PlayerPriv::ProcessAudioTap(opaqueMTAudioProcessingTap const*, long, unsigned int, AudioBufferList*, long*, unsigned int*) in libiPhone-lib.a(AVFoundationVideoPlayback.o)
"_MTAudioProcessingTapCreate", referenced from:
-[AVFoundationMediaLoader ConfigureAudioOutput] in libiPhone-lib.a(AVFoundationVideoPlayback.o)
"_MTAudioProcessingTapGetStorage", referenced from:
-[AVFoundationMediaLoader ConfigureAudioOutput] in libiPhone-lib.a(AVFoundationVideoPlayback.o)
AVFoundationVideoPlayback::PlayerPriv::PrepareAudioTap(opaqueMTAudioProcessingTap const*, long, AudioStreamBasicDescription const*) in libiPhone-lib.a(AVFoundationVideoPlayback.o)
AVFoundationVideoPlayback::PlayerPriv::ProcessAudioTap(opaqueMTAudioProcessingTap const*, long, unsigned int, AudioBufferList*, long*, unsigned int*) in libiPhone-lib.a(AVFoundationVideoPlayback.o)
AVFoundationVideoPlayback::PlayerPriv::FinalizeAudioTap(opaqueMTAudioProcessingTap const*) in libiPhone-lib.a(AVFoundationVideoPlayback.o)
-[AVFoundationMediaLoader StopOutput] in libiPhone-lib.a(AVFoundationVideoPlayback.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:0)
在“链接的框架和库”中,将AVFoundation.framework的状态设置为可选。向其中添加Metal(可选),Security(必需)和MediaToolbox(必需)框架。
在“构建设置”中,
-Double check all header files and Prefix header path are correct.
-ENABLE_STRICT_OBJC_MSGSEND = NO
- Other Linker Flags add this line. -Wl,-undefined,dynamic_lookup
- Mismatched Return type = YES
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS- YES
停止应用程序的干净构建。