首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

ffmpeg的lib函数调用有关问题,出现连接异常2019

2012-04-26 
ffmpeg的lib函数调用问题,出现连接错误20191AvcDecoder.obj : error LNK2019: unresolved external symbo

ffmpeg的lib函数调用问题,出现连接错误2019
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_open referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_alloc_frame referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_alloc_context referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_find_decoder referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_register_all referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_init referenced in function "public: int __thiscall CAvcDecoder::InitDecoder(void)" (?InitDecoder@CAvcDecoder@@QAEHXZ)
1>AvcDecoder.obj : error LNK2019: unresolved external symbol _avcodec_decode_video referenced in function "public: struct tagimage __thiscall CAvcDecoder::DecodeOneImage(unsigned char *)" (?DecodeOneImage@CAvcDecoder@@QAE?AUtagimage@@PAE@Z)
1>d:\My Documents\Visual Studio 2008\Projects\h264decoder\Debug\h264decoder.exe : fatal error LNK1120: 7 unresolved externals

编译时,出现上面的错误,用ffmpeg
extern "C" 

{
#include ".\ffmpeg\avcodec.h"
}

#pragma comment(lib, ".\\ffmpeg\\libavcodec.lib") 

avcodec.h声明与调用一致,不知道libavcodec.lib中什么情况?

[解决办法]
http://download.csdn.net/source/2916908
你可以下载这个试试,这个就是我以前用VS2008调用FFMPEG动态库例子。如果你这个没有问题,那就说明你的这个配置有问题

热点排行