kewlbear / FFmpeg-iOS-build-script

Shell scripts to build FFmpeg for iOS and tvOS
3.03k stars 898 forks source link

X86_64 error #136

Closed zhangfangtaozft closed 5 years ago

zhangfangtaozft commented 5 years ago

Undefined symbols for architecture x86_64: "_avcodec_configuration", referenced from: -[ViewController viewDidLoad] in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

kewlbear commented 5 years ago

I guess you forgot to link with libavcodec.a.

zhangfangtaozft commented 5 years ago

Like this: image and image

and 41542175610_ pic

kewlbear commented 5 years ago

Seems good to me. What do you see when you run file FFmpeg-iOS/lib/libavcodec.a? I see the following:

$ file FFmpeg-iOS/lib/libavcodec.a 
FFmpeg-iOS/lib/libavcodec.a: Mach-O universal binary with 4 architectures: [i386:current ar archive random library] [arm64]
FFmpeg-iOS/lib/libavcodec.a (for architecture i386):    current ar archive random library
FFmpeg-iOS/lib/libavcodec.a (for architecture armv7):   current ar archive random library
FFmpeg-iOS/lib/libavcodec.a (for architecture x86_64):  current ar archive random library
FFmpeg-iOS/lib/libavcodec.a (for architecture arm64):   current ar archive random library
zhangfangtaozft commented 5 years ago

It has been solved, Thank you.