Description
I am able to compile ffmpeg library but when integrate static library of ffmpeg its still giving undefined symbol error for various architecture.
I have tried with http://sourceforge.net/projects/ffmpeg-ios/postdownload?source=dlp too but this is giving same error
Undefined symbols for architecture armv7:
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Activity
kewlbear commentedon Apr 2, 2014
You have to link with libbz2.dylib and libiconv.dylib.
tarunseera commentedon Apr 2, 2014
Thanks, Everything is fine now :)
kewlbear commentedon Apr 3, 2014
Glad I could help.
starmier commentedon Jul 1, 2015
Thanks . I encounter the same situation, and It can work for me .
insidegui commentedon Aug 24, 2015
I don't know if it changed, but I had to link against
libbz2.1.0.dylib
for it to work,libbz2.dylib
didn't.bintu1234 commentedon Feb 10, 2016
HI all I'm also phasing same issue i just add above lib but still it is showing some errors like below
Undefined symbols for architecture x86_64:
"_inflate", referenced from:
_http_read in libffmpeg.a(http.o)
_matroska_decode_buffer in libffmpeg.a(matroskadec.o)
_rtmp_open in libffmpeg.a(rtmpproto.o)
"_inflateEnd", referenced from:
_http_close in libffmpeg.a(http.o)
_http_read_header in libffmpeg.a(http.o)
_matroska_decode_buffer in libffmpeg.a(matroskadec.o)
_rtmp_open in libffmpeg.a(rtmpproto.o)
"inflateInit2", referenced from:
_http_read_header in libffmpeg.a(http.o)
"inflateInit", referenced from:
_matroska_decode_buffer in libffmpeg.a(matroskadec.o)
_rtmp_open in libffmpeg.a(rtmpproto.o)
"_uncompress", referenced from:
_ff_id3v2_read in libffmpeg.a(id3v2.o)
_mov_read_cmov in libffmpeg.a(mov.o)
(maybe you meant: _ssl3_do_uncompress)
"_zlibCompileFlags", referenced from:
_http_read_header in libffmpeg.a(http.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
please help me
kewlbear commentedon Feb 10, 2016
Have you link libz?
bintu1234 commentedon Feb 11, 2016
yes libbz2.0.1.tbd and libbz2.tbd in xcode 7.2
kewlbear commentedon Feb 11, 2016
You need libz instead of libbz2. By the way libbz2 is just a symlink to libbz2.0.1, so you don't have to link both.
bintu1234 commentedon Feb 11, 2016
Thanks its working now
PandaraWen commentedon Jul 19, 2016
I have linked libz, libiconv, libbz, but the errors are remains the same:
Undefined symbols for architecture x86_64:
"sws_getContext(int, int, AVPixelFormat, int, int, AVPixelFormat, int, SwsFilter_, SwsFilter_, double const*)", referenced from:
Do anyone have some idea? I am getting mad...
kid9591 commentedon Nov 21, 2017
@kewlbear thank! you saved my day.
tjayrush commentedon May 12, 2018
Why does everyone always say "You have to link XYZ" but never "You have to link XYZ and here's how to do that"? Okay--so now I know what I have to do, but I have no idea how...
kewlbear commentedon May 14, 2018
@tjayrush Grab a good book on Xcode or google. You should learn such a basic stuff elsewhere.
.
5 remaining items