ffmpeg xcode 中的使用

2016-06-24  本文已影响1059人  SunBoyXiao

导入项目,有静态包经验的就就不用看了,这个对于我这个半路出家的和尚还是处理了老半天才解决.
.a文件直接导入 .h文件要导入文件夹结构 配置header search 环境变量 使用的时候导入文件 结构:#import "文件夹/文件.h"
首次编译.
复制代码
Undefined symbols for architecture armv7:
"deflateInit2", referenced from:
_encode_frame in libavcodec.a(pngenc.o)
"_crc32", referenced from:
_encode_frame in libavcodec.a(pngenc.o)
"_deflateReset", referenced from:
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(zmbvenc.o)
"_compress", referenced from:
_encode_strip in libavcodec.a(tiffenc.o)
"_deflateBound", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_frame in libavcodec.a(lclenc.o)
"_inflateSync", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
"_inflateReset", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_zlib_decomp in libavcodec.a(lcldec.o)
_decode_frame in libavcodec.a(tscc.o)
_zerocodec_decode_frame in libavcodec.a(zerocodec.o)
_decode_frame in libavcodec.a(zmbv.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_inflate", referenced from:
_http_read_stream in libavformat.a(http.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_rtmp_open in libavformat.a(rtmpproto.o)
_zlib_refill in libavformat.a(swfdec.o)
_decode_frame_common in libavcodec.a(pngdec.o)
_decode_text_chunk in libavcodec.a(pngdec.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
...
"inflateInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_rtmp_open in libavformat.a(rtmpproto.o)
_swf_read_header in libavformat.a(swfdec.o)
_decode_frame_apng in libavcodec.a(pngdec.o)
_decode_frame_png in libavcodec.a(pngdec.o)
_decode_text_chunk in libavcodec.a(pngdec.o)
_flashsv_decode_init in libavcodec.a(flashsv.o)
...
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"inflateInit2", referenced from:
_http_read_header in libavformat.a(http.o)
"_deflateEnd", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
_flashsv_encode_init in libavcodec.a(flashsvenc.o)
_flashsv_encode_end in libavcodec.a(flashsvenc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_end in libavcodec.a(lclenc.o)
_encode_init in libavcodec.a(zmbvenc.o)
...
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"deflateInit", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
_encode_init in libavcodec.a(lclenc.o)
_encode_init in libavcodec.a(zmbvenc.o)
"_zlibCompileFlags", referenced from:
_http_read_header in libavformat.a(http.o)
"_compress2", referenced from:
_flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
_flashsv_encode_frame in libavcodec.a(flashsvenc.o)
"_deflate", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(zmbvenc.o)
"_inflateEnd", referenced from:
_http_close in libavformat.a(http.o)
_http_read_header in libavformat.a(http.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_rtmp_open in libavformat.a(rtmpproto.o)
_swf_read_close in libavformat.a(swfdec.o)
_decode_frame_apng in libavcodec.a(pngdec.o)
_decode_frame_png in libavcodec.a(pngdec.o)
...
"_uncompress", referenced from:
_id3v2_read_internal in libavformat.a(id3v2.o)
_mov_read_cmov in libavformat.a(mov.o)
_swf_read_packet in libavformat.a(swfdec.o)
_decode_frame in libavcodec.a(cscd.o)
_decode_frame in libavcodec.a(dxa.o)
_decode_block in libavcodec.a(exr.o)
_g2m_decode_frame in libavcodec.a(g2meet.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)
复制代码
导入 libz.1.2.5.dylib ,再次编译

复制代码
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)
复制代码
导入 libbz2.1.0.dylib ,再次编译

复制代码
Undefined symbols for architecture armv7:
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.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)
复制代码
导入 libiconv.2.4.0.dylib 编译通过 3.0 后不通过

复制代码
Undefined symbols for architecture x86_64:
"_CMBlockBufferCreateWithMemoryBlock", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_CMSampleBufferCreate", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_CMVideoFormatDescriptionCreate", referenced from:
_av_videotoolbox_default_init2 in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionCreate", referenced from:
_av_videotoolbox_default_init2 in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionDecodeFrame", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionInvalidate", referenced from:
_av_videotoolbox_default_free in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionWaitForAsynchronousFrames", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms", referenced from:
_av_videotoolbox_default_init2 in libavcodec.a(videotoolbox.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
复制代码
导入 CoreMedia.framework 编译

复制代码
Undefined symbols for architecture x86_64:
"_VTDecompressionSessionCreate", referenced from:
_av_videotoolbox_default_init2 in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionDecodeFrame", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionInvalidate", referenced from:
_av_videotoolbox_default_free in libavcodec.a(videotoolbox.o)
"_VTDecompressionSessionWaitForAsynchronousFrames", referenced from:
_videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
ld: symbol(s) not found for architecture x86_64
复制代码
导入 VideoToolbox.framework 编译通过

上一篇下一篇

猜你喜欢

热点阅读