3
所以,我试图让一个项目,我正在写反对的ffmpeg库链接,但我一直得到了链接错误:ffmpeg的Windows库不链接(visual studio)?
http://ffmpeg.zeranoe.com/builds/
:1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVCodec * __cdecl avcodec_find_encoder(enum AVCodecID)" ([email protected]@[email protected]@[email protected]@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl av_dict_set(struct AVDictionary * *,char const *,char const *,int)" ([email protected]@[email protected]@[email protected])
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_encode_video(struct AVCodecContext *,unsigned char *,int,struct AVFrame const *)" ([email protected]@[email protected]@[email protected]@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVCodecContext * __cdecl avcodec_alloc_context3(struct AVCodec const *)" ([email protected]@[email protected]@[email protected]@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "struct AVFrame * __cdecl avcodec_alloc_frame(void)" ([email protected]@[email protected]@XZ)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "void __cdecl av_free(void *)" ([email protected]@[email protected])
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_open2(struct AVCodecContext *,struct AVCodec const *,struct AVDictionary * *)" ([email protected]@[email protected]@[email protected]@[email protected]@@Z)
1>GLViewLASReader.obj : error LNK2001: unresolved external symbol "int __cdecl avcodec_close(struct AVCodecContext *)" ([email protected]@[email protected]@@Z)
1>C:\STEAMiE\usr\modules\LASReader\win32\Release\LASReader.exe : fatal error LNK1120: 8 unresolved externals
我从下载的开发包
但是,当我像我通常会链接库,我得到链接器错误。这个软件包与我尝试使用的其他库不同,我只需要.h/.libs?为什么它必须这样呢?
由于在链接器错误信息中函数标识符处没有_前缀,我怀疑你忘记将你在'extern“C”{}'部分使用的ffmpeg包含文件。 – alexbuisson
嗯,就是这样。我花了很多时间在这么简单的事情上。我会尽量记住下次。谢谢。 –