[Ffmpeg-devel] Re: unresolved external symbol

Daniel Dantas ddantasflu
Thu Jan 4 17:04:44 CET 2007


THANK YOU !
  It solved the problem!!
  

QuickTime <ffmpeg at gmail.com> escreveu:
  Dear:

Use "cdecl" ,but not "stdcall" when code generating

>
> Hello everybody,
>
> I got the latest SVN version of ffmpeg. Followed every step in the
> tutorial in order to generate the *.lib files.
>
> I'm writing a very simple project under visual studio 2005, and i'm
> getting the following errors from the linker:
>
> 1>------ Build started: Project: mySourceFilter, Configuration: Debug
> Win32 ------
> 1>Linking...
> 1> Creating library .\Debug/mySourceFilter.lib and object
> .\Debug/mySourceFilter.exp
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _av_register_all at 0 referenced in function "public: __thiscall
> CffmpegWrapper::CffmpegWrapper(char const *)" (??0CffmpegWrapper@@QAE at PBD at Z)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _av_close_input_file at 4 referenced in function "public: __thiscall
> CffmpegWrapper::~CffmpegWrapper(void)" (??1CffmpegWrapper@@QAE at XZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avcodec_close at 4 referenced in function "public: __thiscall
> CffmpegWrapper::~CffmpegWrapper(void)" (??1CffmpegWrapper@@QAE at XZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol _av_free at 4
> referenced in function "public: __thiscall
> CffmpegWrapper::~CffmpegWrapper(void)" (??1CffmpegWrapper@@QAE at XZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _dump_format at 16 referenced in function "public: int __thiscall
> CffmpegWrapper::OpenFile(void)" (?OpenFile at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _av_find_stream_info at 4 referenced in function "public: int __thiscall
> CffmpegWrapper::OpenFile(void)" (?OpenFile at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _av_open_input_file at 20 referenced in function "public: int __thiscall
> CffmpegWrapper::OpenFile(void)" (?OpenFile at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avcodec_open at 8 referenced in function "public: int __thiscall
> CffmpegWrapper::OpenVideoStream(void)"
> (?OpenVideoStream at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avcodec_find_decoder at 4 referenced in function "public: int __thiscall
> CffmpegWrapper::OpenVideoStream(void)"
> (?OpenVideoStream at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avpicture_fill at 20 referenced in function "public: int __thiscall
> CffmpegWrapper::InitializeBuffers(void)"
> (?InitializeBuffers at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avpicture_get_size at 12 referenced in function "public: int __thiscall
> CffmpegWrapper::InitializeBuffers(void)"
> (?InitializeBuffers at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avcodec_alloc_frame at 0 referenced in function "public: int __thiscall
> CffmpegWrapper::InitializeBuffers(void)"
> (?InitializeBuffers at CffmpegWrapper@@QAEHXZ)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _img_convert at 24 referenced in function "public: int __thiscall
> CffmpegWrapper::GetFrame(unsigned char *)"
> (?GetFrame at CffmpegWrapper@@QAEHPAE at Z)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _avcodec_decode_video at 20 referenced in function "public: int __thiscall
> CffmpegWrapper::GetFrame(unsigned char *)"
> (?GetFrame at CffmpegWrapper@@QAEHPAE at Z)
> 1>FFmpegWrapper.obj : error LNK2019: unresolved external symbol
> _av_read_frame at 8 referenced in function "public: int __thiscall
> CffmpegWrapper::GetFrame(unsigned char *)"
> (?GetFrame at CffmpegWrapper@@QAEHPAE at Z)
> 1>.\Debug/mySourceFilter.dll : fatal error LNK1120: 15 unresolved
> externals
>
>
> I included the following libs in the linker input:
>
> libcmt.lib avcodec-51.lib avformat-51.lib avutil-49.lib winmm.lib
> strmbasd.lib strmiids.lib
>
> I put them all on the path for the compiler:
> tools->options->VC++directories
>
> I noticed that avcodec.h and avformat.h include the extern "C" {...}
> directive in order to prevent the linker from mangling the names of the C
> style functions.
>
> I don't have any clue about what is happening.
> Any ideas ?
> Thx in advance
> Daniel
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel


 __________________________________________________
Fale com seus amigos  de gra?a com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 



More information about the ffmpeg-devel mailing list