[Libav-user] undefined reference to avformat_write_header

Sabine Bachmayer sabine.bachmayer at jku.at
Tue Aug 2 10:30:24 CEST 2011


Hi!

Problem solved!
Eclipse had conflicts with an old ffmpeg version from ubuntu and the
newer one I use.

Br,
Sabine


On Mon, 2011-08-01 at 14:56 +0300, Sabine Bachmayer wrote:
> Hi!
> 
> I'm using the libraries of ffmpeg 0.7.1 in ubuntu 10.10. 
> All in all, the libraries work great in Eclipse CDT (using C++) but I
> have problems using avformat_write_headers(AVFormatContext*,
> AVDictionary**) instead of the deprecated function av_write_header. I
> always get the following error during compilation:
> undefined reference to `avformat_write_header' C/C++ Problem
> 
> The weird thing is, that I'm able to use other functions that are
> declared in libavformat/avformat.h and implemented in
> libavformat/utils.c - for example av_guess_format(...) and
> av_set_parameters(...), etc.
> 
> There seems to be no mistakes in the usage of avformat_write_headers
> which is the following:
> avformat_write_header(pFormatCtx,NULL);
> where pFormatCtx is of type AVFormatContext* including a previously
> opened mpeg file.
> 
> I checked the include paths for C++ and C compilers as well as the
> include libraries and library search path for the linker. 
> 
> I also tried to include libavformat/utils.c directly, but in this case I
> get 44 compiler errors in utils.c which is weird as well because I
> already compiled ffmpeg successfully by using its makefile.
> 
> Any idea where the mistake could be?
> 
> Thank you very much for your help!
> 
> Kind regards,
> Sabine
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Filtered-With-Copfilter: Version 0.85.2 (ProxSMTP 1.8)
> by Markus Madlener @ http://www.copfilter.org
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

-- 
-------------------------------------------------
Dipl. Ing. Sabine Bachmayer
Department of Telecooperation
Johannes Kepler University Linz
Altenberger Straße 69, 4040 Linz
Austria
Phone: +43 732 2468-9264 
Fax: +43 732 2468-9829

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Filtered-With-Copfilter: Version 0.85.2 (ProxSMTP 1.8)
by Markus Madlener @ http://www.copfilter.org


More information about the Libav-user mailing list