[Libav-user] ffmpeg static library linking issue

吳立志 lichih at daiseki.com.tw
Thu Jul 5 06:27:39 CEST 2012


> Hi All,
> I compiled the ffmpeg source to generate the static(.a foramt) libraries  in linux.
> When i am linking the static libraries with my application,
> i am getting undefined reference for many functions.
> Even i tried with pkg-config.
> Here command , what i tried

I have encountered the same problem, I solved this problem but I don't
know why it works.

old test.c:

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

int main()
{
	av_register_all();
	return 0;
}


new test.c:

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

int main()
{
	avcodec_register_all();
	av_register_all();
	return 0;
}


More information about the Libav-user mailing list