Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 用于ffmpeg don';t链接(visual studio)?_C++_Windows_Visual Studio 2010_Linker_Ffmpeg - Fatal编程技术网

C++ 用于ffmpeg don';t链接(visual studio)?

C++ 用于ffmpeg don';t链接(visual studio)?,c++,windows,visual-studio-2010,linker,ffmpeg,C++,Windows,Visual Studio 2010,Linker,Ffmpeg,因此,我试图获得一个我正在编写的项目,以链接ffmpeg库,但我不断收到链接器错误: 1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVCodec * __cdecl avcodec_find_encoder(enum AVCodecID)" (?avcodec_find_encoder@@YAPEAUAVCodec@@W4AVCodecID@@@Z) 1>GLViewLASRead

因此,我试图获得一个我正在编写的项目,以链接ffmpeg库,但我不断收到链接器错误:

1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVCodec * __cdecl avcodec_find_encoder(enum AVCodecID)" (?avcodec_find_encoder@@YAPEAUAVCodec@@W4AVCodecID@@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl av_dict_set(struct AVDictionary * *,char const *,char const *,int)" (?av_dict_set@@YAHPEAPEAUAVDictionary@@PEBD1H@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_encode_video(struct AVCodecContext *,unsigned char *,int,struct AVFrame const *)" (?avcodec_encode_video@@YAHPEAUAVCodecContext@@PEAEHPEBUAVFrame@@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVCodecContext * __cdecl avcodec_alloc_context3(struct AVCodec const *)" (?avcodec_alloc_context3@@YAPEAUAVCodecContext@@PEBUAVCodec@@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVFrame * __cdecl avcodec_alloc_frame(void)" (?avcodec_alloc_frame@@YAPEAUAVFrame@@XZ)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "void __cdecl av_free(void *)" (?av_free@@YAXPEAX@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_open2(struct AVCodecContext *,struct AVCodec const *,struct AVDictionary * *)" (?avcodec_open2@@YAHPEAUAVCodecContext@@PEBUAVCodec@@PEAPEAUAVDictionary@@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_close(struct AVCodecContext *)" (?avcodec_close@@YAHPEAUAVCodecContext@@@Z)
1>C:\STEAMiE\usr\modules\LASReader\win32\Release\LASReader.exe : fatal error LNK1120: 8 unresolved externals
我从以下位置下载了开发包:


但是当我像往常一样链接libs时,我会得到链接器错误。这个包与我尝试使用的所有其他库(我只需要.h/.libs)有什么不同吗?有这样的原因吗?

由于链接器错误消息中的函数标识符没有前缀,我怀疑您忘记将使用的ffmpeg include文件放入“extern”C“{}”部分

由于链接器错误消息中的函数标识符没有uuu前缀,我怀疑您忘记将您使用的ffmpeg include文件放在“extern”C“{}”节中了。我花了很多时间在这么简单的事情上。下次我会尽量记住的。非常感谢。