我想编译这个.
program.c
#include <libavcodec/avcodec.h>
int main(){
int i = avpicture_get_size(AV_PIX_FMT_RGB24,300,300);
}
运行此程序
gcc -I$HOME/ffmpeg/include program.c
给出错误
/tmp/ccxMLBme.o: In function `main':
program.c:(.text+0x18): undefined reference to `avpicture_get_size'
collect2: ld returned 1 exit status
但是,avpicture_get_大小是有定义的.为什么会这样?