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
慕容3067478