【发布时间】:2013-12-19 17:24:25
【问题描述】:
我正在尝试使用 FFMPEG 库编写程序。我在this 链接中读到。我从 http://ffmpeg.zeranoe.com/builds/ 下载了 Shared 和 Devs 文件。
我创建了一个控制台项目,这是配置:
其他库目录
其他包含目录
这是我的代码:
#include "stdafx.h"
#pragma comment (lib, "avformat.lib")
#pragma comment (lib, "avcodec.lib")
#pragma comment (lib, "avutil.lib")
extern "C"
{
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include <libavcodec\avcodec.h>
#include <libavformat\avformat.h>
#include <libswscale\swscale.h>
#include <libavutil\avutil.h>
}
int _tmain(int argc, _TCHAR* argv[])
{
av_register_all();
return 0;
}
我得到的错误是:
错误 1 错误 LNK2019:未解析的外部符号 _av_register_all 在函数 _wmain C:\Users\Andres\Documents\Visual Studio 中引用 2013\Projects\PruebaFFMPEG\PruebaFFMPEG\PruebaFFMPEG.obj PruebaFFMPEG
错误 2 错误 LNK1120: 1 未解决 外部 C:\Users\Andres\Documents\Visual Studio 2013\Projects\PruebaFFMPEG\Debug\PruebaFFMPEG.exe PruebaFFMPEG
我错过了什么?
【问题讨论】:
标签: visual-c++ linker ffmpeg visual-studio-2013