我正在尝试在Ubuntu上编译使用ffmpeg的应用程序,并且遇到以下错误。
undefined reference to `av_write_image_line2'
undefined reference to `av_hwframe_transfer_data'
undefined reference to `av_hwdevice_get_hwframe_constraints'
undefined reference to `av_hwframe_get_buffer'
undefined reference to `av_hwdevice_ctx_create_derived'
undefined reference to `xcb_xfixes_get_cursor_image_cursor_image'
undefined reference to `xcb_xfixes_query_version'
undefined reference to `avpriv_slicethread_execute'
undefined reference to `avcodec_parameters_to_context'
undefined reference to `xcb_xfixes_get_cursor_image_reply'
undefined reference to `av_hwdevice_find_type_by_name'
undefined reference to `av_hwframe_map'
undefined reference to `av_spherical_tile_bounds'
undefined reference to `av_malloc_array'
undefined reference to `av_hwframe_transfer_get_formats'
undefined reference to `av_hwframe_ctx_alloc'
undefined reference to `xcb_shape_rectangles'
undefined reference to `av_stereo3d_type_name'
undefined reference to `avpriv_slicethread_free'
undefined reference to `avpriv_slicethread_create'
undefined reference to `xcb_xfixes_get_cursor_image'
undefined reference to `av_hwframe_ctx_init'
undefined reference to `avpriv_register_devices'
undefined reference to `av_hwframe_constraints_free'
undefined reference to `av_audio_fifo_peek_at'
undefined reference to `av_get_extended_channel_layout'
undefined reference to `av_hwframe_ctx_create_derived'
undefined reference to `xcb_xfixes_query_version_reply'
undefined reference to `av_mallocz_array'
undefined reference to `av_read_image_line2'
我拥有的ffmpeg版本:
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --enable-pic --pkg-config-flags=--static --extra-libs='-lpthread -lm'
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
在我的makefile文件中,我已将-lavutil -lavcodec -lavdevice -lavfilter -lavformat -lswresample -lswscale添加到我的链接步骤。
我在做什么错?这些在我拥有的ffmpeg版本中已弃用吗?