On Wed, Oct 18, 2017 at 2:44 PM, Reino Wijnsma <rwijn...@xs4all.nl> wrote: > > Is there a reason you left out -DOPJ_STATIC? >
I assumed OpenJPEG's pkgconfig file would be smart enough to add it in if needed. Apparently that's not the case. Dang. 'openjpeg_git/src/lib/openjp2/libopenjp2.pc.cmake.in' doesn't put it in. > With this patch ./configure therefor fails over here with: > "test.o:test.c:(.text+0x1): undefined reference to `_imp__opj_version@0'". > > enabled libopenjpeg && require_pkg_config libopenjpeg "libopenjp2 > >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC > > This line fixes that. -DOPJ_STATIC was originally added to ffmpeg's configure script for Windows. Unconditionally adding -DOPJ_STATIC would conflict with people who are dynamically linking. I'll look into this further. I'll start with the following: enabled libopenjpeg && {{require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC;} || require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version;} and see if it works for both static and dynamic builds of OpenJPEG. Unfortunately, I don't have a Windows system to test on, so if anyone can validate the above on Windows I'd appreciate it. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel