[FFmpeg-user] undefined reference errors when calling avdevice_register_all()

Clément Bœsch u at pkh.me
Wed Apr 23 08:08:24 CEST 2014


On Tue, Apr 22, 2014 at 03:28:53AM -0700, Thanh-Nghi Le wrote:
> When calling avdevice_register_all(), I got these errors:
> 
> /usr/local/lib/libavfilter.a(avf_showspectrum.o): In function
> `config_output':
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/avf_showspectrum.c:170:
> undefined reference to `av_rdft_end'
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/avf_showspectrum.c:171:
> undefined reference to `av_rdft_init'
> /usr/local/lib/libavfilter.a(avf_showspectrum.o): In function
> `plot_spectrum_column':
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/avf_showspectrum.c:298:
> undefined reference to `av_rdft_calc'
> /usr/local/lib/libavfilter.a(avf_showspectrum.o): In function `uninit':
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/avf_showspectrum.c:106:
> undefined reference to `av_rdft_end'
> /usr/local/lib/libavfilter.a(vf_dctdnoiz.o): In function `dct_block':
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/vf_dctdnoiz.c:82: undefined
> reference to `av_dct_calc'
> /opt/install-ffmpeg/ffmpeg-2.1.4/libavfilter/vf_dctdnoiz.c:95: undefined
> reference to `av_dct_calc'
> /usr/local/lib/libavfilter.a(vf_dctdnoiz.o): In function `idct_block':
> [......]
> 
> Here is my code:
> 
> #include <stdio.h>
> #include <libavformat/avformat.h>
> 
> int main() {
> 	av_register_all();
> 	avdevice_register_all();
> 
> 	return 0;
> }
> 
> And I compile it as below:
> 
> gcc demo_capture.c -o demo_capture -pthread -lavformat -lavcodec -lavdevice
> -lavfilter -lavutil -lswscale -lswresample -lpostproc -lz -lrt -lm -lx264
> -lmp3lame -lvpx -lasound -lSDL
> 
> If I remove the function avdevice_register_all(), it's OK, no errors appears
> then.
> So what causes the above errors?
> 

Works for me here. This looks related to libavfilter dependencies to
libavcodec. How was FFmpeg built?

There was a dependency bug at some point but it was fixed and I checked
it's present in 2.1.4 so it should be fine...

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140423/7e15988d/attachment.asc>


More information about the ffmpeg-user mailing list