话不多说,直接上基础代码:
#include<stdio.h>
#include<libavutil/log.h>
int main()
{
av_log_set_level(AV_LOG_DEBUG);
av_log(NULL, AV_LOG_DEBUG, "Hello world");
return 0;
}
输入编译指令:
gcc test.c -o ttt `pkg-config --libs --cflags libavutil`
出现报错:
fatal error:libavutil/log.h:no such file or directory
具体解决办法:
(1)安装pkg-config
apt install pkg-config
在命令行终端输入pkg-config
如果出现出现以下英文,证明安装成功
Must specify package names on the command line
(2)
gcc test.c -o test ' pkg-config --libs --cflags libavutil'
出现新的错误:
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory co