[FFmpeg-user] undefined reference errors when calling avdevice_register_all()
Thanh-Nghi Le
thanhnghile.py.bk at gmail.com
Tue Apr 22 12:28:53 CEST 2014
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?
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/undefined-reference-errors-when-calling-avdevice-register-all-tp4664883.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user
mailing list