tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.87k stars 791 forks source link

XCode 12 - Undefined symbols for architecture x86_64 - error: linker command failed with exit code 1 (use -v to see invocation) #573

Closed ankitthakur closed 3 years ago

ankitthakur commented 4 years ago

Description I was running my application on XCode 11 and it was working fine with the simulator. But once I updated my XCode, I am continuously facing build error for this library.

Expected behavior Mobile FFMpeg library should be built for simulators also.

Current behavior Undefined symbols for architecture x86_64: "_OBJCCLASS$_MobileFFmpeg", referenced from: objc-class-ref in AudioConverter.o "_OBJCCLASS$_MobileFFprobe", referenced from: objc-class-ref in ModelExtension.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Screenshots If applicable, add screenshots to help explain your problem.

Logs ... Pods/mobile-ffmpeg-full/vo-amrwbenc.xcframework/ios-arm64/vo-amrwbenc.framework/vo-amrwbenc, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64 Pods/mobile-ffmpeg-full/twolame.xcframework/ios-arm64/twolame.framework/twolame, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64 Pods/mobile-ffmpeg-full/wavpack.xcframework/ios-arm64/wavpack.framework/wavpack, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64 Undefined symbols for architecture x86_64: "_OBJCCLASS$_MobileFFmpeg", referenced from: objc-class-ref in AudioConverter.o "_OBJCCLASS$_MobileFFprobe", referenced from: objc-class-ref in EvaModelExtension.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment

denishgcirklestudio commented 4 years ago

Runnin on simulator issue

I am trying to run my project in Xcode Version 12.0.1 (12A7300) in Simulator but not able to run the project because getting the above error.

tanersener commented 4 years ago

v4.4 was tested against Xcode 12.x and no issues were found. If you encounter issues in your projects try running the main test application under the ios/test-app/pods-with-tooltips folder and report if error persists. I believe these errors are caused by the changes made on Simulator architectures/settings in Xcode 12.x.

denishgcirklestudio commented 4 years ago

I got resolution by updating to latest pod version of ffmpeg mentioned below. Try updating pod version of ffmpeg.

pod 'mobile-ffmpeg-full', '4.4.LTS'