kewlbear/FFmpeg-iOS-build-script

X86_64 error

zhangfangtaozft opened this issue · 4 comments

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)

I guess you forgot to link with libavcodec.a.

Like this:
image
and
image

and
41542175610_ pic

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

It has been solved, Thank you.