In program.c, I would like to use a method 'avcodec_register_all()' defined in libavcodec/avcodec.h.
Running
gcc program.c -L$HOME/ffmpeg/lib/libavfilter.a -L$HOME/ffmpeg/lib/libavcodec.a Gives me an error
/tmp/ccNeQywU.o: In function `main': program.c:(.text+0x3f): undefined reference to `avcodec_register_all' collect2: ld returned 1 exit status Spelling is correct and the function is defined. Why is this happening?
program.c
#include <stdio.h> int main (int args, char *argv[]) { avcodec_register_all(); }
-L$HOME/ffmpeg/lib/ -lavfilter -lavcodecavcodec_register_allone of them? or is that error gone now?