使用此链接在 Windows 上安装FFMPEG https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip。
我连接了一切include,然后lib...所有功能都是可见的,但在组装过程中会出现链接错误。
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#pragma comment(lib, "avcodec.lib")
#pragma comment(lib, "avformat.lib")
#pragma comment(lib, "swscale.lib")
#pragma comment(lib, "avdevice.lib")
#pragma comment(lib, "avutil.lib")
#pragma comment(lib, "avfilter.lib")
#pragma comment(lib, "postproc.lib")
#pragma comment(lib, "swresample.lib")
int main(int argc, char* argv[])
{
AVFormatContext* pFormatCtx = NULL;
avformat_open_input(&pFormatCtx, argv[1], NULL, 0);
return 0;
}
函数 _main 中引用的未解析的外部符号 _avformat_open_input