为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

哈士奇WWW 2022-07-01 11:07:54
VS2012中使用FFMPEG库,#define inline _inline#ifndef INT64_C#define INT64_C(c) (c ## LL)#define UINT64_C(c) (c ## ULL)#endif#ifdef __cplusplusextern "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 codecsav_register_all();}编译错误:main.obj : error LNK2019: 无法解析的外部符号 _av_register_all,该符号在函数 _main 中被引用求大神T_T
查看完整描述

1 回答

?
慕容3067478

TA贡献1773条经验 获得超3个赞

你的.lib文件没有附加到库目录里面,把文件附加到里面就可以了,我是第二个工程使用,发现没有的,加入之后所有的问题就都好了


查看完整回答
反对 回复 2022-07-05
  • 1 回答
  • 0 关注
  • 342 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号