[FFmpeg-user] Dynamically linking to OpenJPEG 2 library

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Mar 28 15:49:38 CEST 2016


Aaron Boxer <boxerab <at> gmail.com> writes:

> On Mon, Mar 28, 2016 at 7:32 AM, Carl Eugen Hoyos wrote:
> 
> > Aaron Boxer <boxerab <at> gmail.com> writes:
> >
> > > I am having trouble compiling FFmpeg with OpenJPEG 2 built
> > > as a shared library.
> >
> > I downloaded the current openjpeg release:
> > https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz
> >
> > I built and installed it with default options, a shared
> > library that does not link to dl(open) was installed.
> >
> > I ran configure with --enable-libopenjpeg, it succeeded
> > out-of-the-box. make did not show any errors, the
> > resulting FFmpeg binaries link against libopenjpeg.
> 
> Thanks, Carl. That is good to hear.
> 
> Do you mind telling me:
> 
> 1) your OS

This is completely irrelevant but I tested on Linux.
Due to secret decisions of the openjpeg maintainers 
you will need an OS with cmake support though;-(

> 2) the complete ./configure command line

$ ./configure --enable-libopenjpeg

If you want to test libopenjpeg, this is the only configure 
line that makes sense, feel free to add "--enable-gpl" if 
you'd like to test more filters.

> > > libavcodec/libavcodec.a(libopenjpegdec.o): In function
> > > `libopenjpeg_decode_frame':
> > > /home/aaron/src/FFmpeg/libavcodec/libopenjpegdec.c:378:
> > > undefined reference to `opj_create_decompress'
> >
> > Running nm on the installed library shows
> > opj_create_compress here.

Sorry, this should have been "nm shows opj_create_compress 
and opj_create_decompress here".

Carl Eugen



More information about the ffmpeg-user mailing list