求解析,为什么无法解析的外部符号 _av_register_all?

VS2012中使用FFMPEG库,
#define inline _inline
#ifndef INT64_C
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
#include <libavutil/mem.h>

#ifdef __cplusplus
}
#endif

#include <stdio.h>
static void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame);

int main (int argc, const char * argv[])
{
char* filename = "E:\\A.avi";
AVFormatContext *pFormatCtx = NULL;
int i, videoStream;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;

// Register all formats and codecs
av_register_all();
}

编译错误:

main.obj : error LNK2019: 无法解析的外部符号 _av_register_all,该符号在函数 _main 中被引用

求大神T_T

哈士奇WWW
浏览 343回答 1
1回答

慕容3067478

你的.lib文件没有附加到库目录里面,把文件附加到里面就可以了,我是第二个工程使用,发现没有的,加入之后所有的问题就都好了
打开App,查看更多内容
随时随地看视频慕课网APP